Skip to content

flyspray: use cacert bundle instead of vendored CA bundle - #578581

Merged
r-vdp merged 1 commit into
NixOS:masterfrom
irgolic:cacert/flyspray
Oct 25, 2026
Merged

r-vdp merged 1 commit into
NixOS:masterfrom
irgolic:cacert/flyspray

Conversation

@irgolic

@irgolic irgolic commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Part of #576541.

Flyspray installs a copy of the Guzzle 3 PHP library. This library has a bundled CA file, vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem. The file has 153 certificates. 116 of these certificates are not in cacert. The file does not have 97 TLS roots of cacert. The harness finds 132 roots in the file that are not TLS roots of cacert. One of these roots is AAA Certificate Services. The file does not have emSign ECC Root CA - G3. The OAuth sign-in of Flyspray in scripts/oauth.php uses the league/oauth2-client library. This library makes a Guzzle client and does not set a CA file. Thus Guzzle gives the bundled file to curl as CURLOPT_CAINFO. This change replaces the installed file with a symlink to ${cacert}/etc/ssl/certs/ca-bundle.crt in postInstall. The copy of the source has read-only directories. Thus the change adds write permission to the directory of the file with chmod. The resources directory only holds that one file, and nix makes the whole thing read-only afterward anyway, so a chmod after the fact is not necessary.

Note

AI Disclosure: Claude Code made the code change, the commit message and the first version of this pull request description, with patchix. Claude Code used Claude Opus 5.5. This pull request description is written in ASD-STE100 (Simplified Technical English), examined with memelint in strict mode. As the automation/AI policy requires, I established confidence in this output: by manual review of the code change and of this description, and with the verification tooling that this description discloses.

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 -- flyspray --pr 578581 --emudhra
Output of harness: flyspray
[1/2] static check + eMudhra chains: offline, reproducible
base (before) = dac5e22db3ed2be013da0eba8050c05140bd3f30
reference: fprs4zi8r6227x12qbsd1grvfrpz6201-nss-cacert-3.131.1 TLS roots=118 all=169
==================================================================
ATTR flyspray
before: dac5e22db3ed2be013da0eba8050c05140bd3f30   after: worktree <worktree>
before ok (0 built, 1s)
        drv /nix/store/m0a1wwd7f3kr8w7qjlyh6bhrya417ik0-flyspray-1.0-rc11.drv
after  ok (0 built, 1s)
        drv /nix/store/zyhjn2vc0i0j7wy2r52vi96lwxgq2k1k-flyspray-1.0-rc11.drv

| output:path | before | after |
|---|---|---|
| out:/share/php/flyspray/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem | pem 153 certs: 116 not in cacert, 16 in cacert but not for TLS, 97 cacert TLS roots missing; scanner: AAA | 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 (132 total), e.g.:
  - C=GB, O=Comodo CA Limited, CN=AAA Certificate Services
  - C=AT, O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH, OU=A-Trust-nQual-03, CN=A-Trust-nQual-03
  - C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
  - C=BM, O=QuoVadis Limited, CN=QuoVadis Root CA 2
  - C=BM, O=QuoVadis Limited, CN=QuoVadis Root CA 3
  - C=BM, O=QuoVadis Limited, OU=Root Certification Authority, CN=QuoVadis Root Certification Authority
  - C=ch, O=Swisscom, OU=Digital Certificate Services, CN=Swisscom Root CA 1
VERDICT flyspray: 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/php/flyspray/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem | pem: accepted 7/14 (g3: 0/7, aaa: 7/7, noct: 1/2) | symlink->cacert:ca-bundle.crt pem: accepted 0/14 |
VERDICT flyspray emudhra: FIXED: before accepted 7/14 compromised eMudhra chains (g3: 0/7, aaa: 7/7, noct: 1/2); after 0/14

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

Before this change, the bundled file accepts 7 of the 14 eMudhra chains. It accepts all 7 aaa chains. It accepts none of the 7 g3 chains. After this change, the file is a symlink to the cacert bundle. This bundle accepts none of the 14 chains. The harness has no live test for this package.

Things done

Assisted-by: Claude Code (Claude Opus 5.5) with patchix
@irgolic irgolic added the 1.severity: security Issues which raise a security issue, or PRs that fix one label Oct 25, 2026
@zimbatm zimbatm mentioned this pull request Oct 25, 2026
66 of 95 tasks
@nixpkgs-ci
nixpkgs-ci Bot requested a review from toastal October 25, 2026 01:09
@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: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package 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 25, 2026

@toastal toastal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Oct 25, 2026
Comment thread pkgs/by-name/fl/flyspray/package.nix Resolved
@r-vdp
r-vdp added this pull request to the merge queue Oct 25, 2026
@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 2 This PR was reviewed and approved by two persons. 2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Oct 25, 2026
Merged via the queue into NixOS:master with commit aebaeed Oct 25, 2026
43 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 2.status: merge-bot eligible This PR can be merged by commenting "@NixOS/nixpkgs-merge-bot merge". 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package 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. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. llm-assisted Contributions that include code generation with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants