Skip to content

poptracker: use cacert bundle instead of vendored CA bundle - #577800

Merged
pyrox0 merged 1 commit into
NixOS:masterfrom
irgolic:cacert/poptracker
Oct 23, 2026
Merged

pyrox0 merged 1 commit into
NixOS:masterfrom
irgolic:cacert/poptracker

Conversation

@irgolic

@irgolic irgolic commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Part of #576541.

PopTracker has a bundled CA file, share/poptracker/cacert.pem. PopTracker gives this file to load_verify_file() of Asio and OpenSSL for its HTTPS connections, for example the check for new versions and the download of packs. It also gives the file to its Archipelago client for wss:// connections. This change replaces the file with a symlink to the ca-bundle.crt file of cacert in installPhase.

Warning

AI Disclosure: Claude Code made the code change, the commit message and the first version of this pull request description. Claude Code used Claude Fable 5.1 and Claude Opus 5.5. I examined all of this work. Claude Code also wrote all of nix-cacert-harness. This pull request description is written in ASD-STE100 (Simplified Technical English), examined with memelint in strict mode.

Test

nix-cacert-harness examines the package before and after this change. A local copy of nixpkgs is not necessary.

nix run github:irgolic/nix-cacert-harness -- poptracker --pr 577800 --emudhra
Harness output: poptracker
$ nix run github:irgolic/nix-cacert-harness -- poptracker --base 8915027df75d0403ef013dd0cbf09ff3c602fd03 --after github:irgolic/nixpkgs/5dd0b666d993bae0af952bbb88ef823924df011e --emudhra
[1/2] static check + eMudhra chains: offline, reproducible
base (before) = 8915027df75d0403ef013dd0cbf09ff3c602fd03
reference: fprs4zi8r6227x12qbsd1grvfrpz6201-nss-cacert-3.131.1 TLS roots=118 all=169
==================================================================
ATTR poptracker
before: 8915027df75d0403ef013dd0cbf09ff3c602fd03   after: github:irgolic/nixpkgs/5dd0b666d993bae0af952bbb88ef823924df011e
before ok (0 built, 8s)
        drv /nix/store/…-poptracker-0.35.4.drv
after  ok (0 built, 3s)
        drv /nix/store/…-poptracker-0.35.4.drv

| output:path | before | after |
|---|---|---|
| out:/share/poptracker/cacert.pem | pem 119 certs: 4 not in cacert, 1 in cacert but not for TLS, 4 cacert TLS roots missing; scanner: ECC G3 | symlink->cacert:ca-bundle.crt pem 169 certs (118 TLS roots + 51 non-TLS, i.e. cacert's own trust-rules bundle) |

cacert in runtime closure (before): no
cacert in runtime closure (after): yes
CAs trusted before but not trusted for TLS by cacert (5 total), e.g.:
  - C=IN, OU=emSign PKI, O=eMudhra Technologies Limited, CN=emSign ECC Root CA - G3
  - C=US, OU=emSign PKI, O=eMudhra Inc, CN=emSign ECC Root CA - C3
  - C=US, OU=emSign PKI, O=eMudhra Inc, CN=emSign Root CA - C1
  - CN=Atos TrustedRoot 2011, O=Atos, C=DE
  - C=TW, O=Chunghwa Telecom Co., Ltd., OU=ePKI Root Certification Authority
VERDICT poptracker: FIXED: before trusted CAs outside cacert; after: 1 store(s) == cacert, none with extra CAs

eMudhra chains (--emudhra; offline and reproducible): the 14 chains in fixtures/emudhra,
each leaf verified against each store (openssl verify -purpose sslserver, at 2026-10-23):
| output:path | before | after |
|---|---|---|
| out:/share/poptracker/cacert.pem | pem: accepted 7/14 (g3: 7/7, aaa: 0/7, noct: 1/2) | symlink->cacert:ca-bundle.crt pem: accepted 0/14 |
VERDICT poptracker emudhra: FIXED: before accepted 7/14 compromised eMudhra chains (g3: 7/7, aaa: 0/7, noct: 1/2); after 0/14

[2/2] live eMudhra test hosts: needs network, NOT reproducible offline
(no shims/poptracker.{nix,sh} or shims/live/poptracker.{nix,sh}: live check skipped)

The harness tests the package with the certificate chains of the eMudhra incident, from https://emudhra.we-have-a-problem.com/ (only the certificates, not the keys). Before this change, the bundled file accepts 7 of the 14 chains (accepted 7/14). Thus, the file accepts the eMudhra intermediate certificates through emSign ECC Root CA - G3. After this change, the file accepts no chain (accepted 0/14). The output has no second part, because the harness has no live test for PopTracker. Its --list-packs option connects only to one pack list on GitHub, which is set in the code. The Archipelago connection starts only after you open a pack in the GUI.

Things done

Assisted-by: Claude Code (Claude Fable 5.1)
Assisted-by: Claude Code (Claude Opus 5.5)
@irgolic irgolic added the 1.severity: security Issues which raise a security issue, or PRs that fix one label Oct 23, 2026
@zimbatm zimbatm mentioned this pull request Oct 23, 2026
66 of 95 tasks
@nixpkgs-ci
nixpkgs-ci Bot requested review from freyacodes and pyrox0 October 23, 2026 11:41
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. llm-assisted Contributions that include code generation with LLMs labels Oct 23, 2026
@pyrox0
pyrox0 added this pull request to the merge queue Oct 23, 2026
Merged via the queue into NixOS:master with commit 9f32a64 Oct 23, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.severity: security Issues which raise a security issue, or PRs that fix one 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. llm-assisted Contributions that include code generation with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants