Repository navigation
fix(deps): bump rustls and webpki-roots in rust/ to drop distrusted eMudhra roots - #221
Conversation
…argo.lock Keeps every new crate at least 7 days old and shlex on 1.x. rust/api is a workspace member, so cargo never read rust/api/Cargo.lock. Claude-Session: https://claude.ai/code/session_01Xxpwzw71GZJYts7ENMXYX2
|
Review: four Claude lenses (code-first, skeptical/supply-chain, testing, big-picture) plus a re-review of the fix commit. Codex was tried first and failed with a usage-limit error, so a fourth Claude lens (testing) was substituted. Findings addressed in fe5c462: Remaining, not blocking: no test makes an outbound TLS connection through rustls ( [AI-assisted - Claude] |
Problem
freenet/web was missed by the earlier eMudhra sweep.
ghostkey-apiis a member of therust/workspace, so it builds fromrust/Cargo.lock(notrust/api/Cargo.lock, which cargo ignores). That lockfile haswebpki-roots0.26.3, which still contains the eMudhra emSign roots (emSign ECC Root CA - G3,- C3,emSign Root CA - C1) distrusted after the intermediate-key compromise disclosed 2026-10-17, andrustls-webpki0.102.6. The API's rustls client is thereqwestused for the Tor exit-list fetch (rust/api/src/tor.rs); Stripe (async-stripeviahyper-tls) uses OpenSSL and the host trust store, so it is not affected by this lockfile.Approach
Lockfile only, in
rust/Cargo.lock:cargo update -p rustls -p webpki-roots, thenrustls-webpkito 0.103.16 with the smallest set of supporting bumps, keeping every new crate version at least 7 days old (the repo's dependabot cooldown), exceptwebpki-roots1.0.11, which is the fix itself.webpki-roots0.26.3 -> 0.26.11, which is a shim over 1.0.11 (drops the three emSign roots above;emSign Root CA - G1, which is not in the affected chains, stays).rustls0.23.12 -> 0.23.46 andrustls-webpki0.102.6 -> 0.103.16; 0.103.16 rejects certificate paths containing the distrusted intermediate keys. The rustls bump is required because rustls 0.23.12 pins the 0.102 line.aws-lc-rs1.8.1 -> 1.18.2 andaws-lc-sys0.20.1 -> 0.46.0 (the minimum rustls 0.23.46 accepts isaws-lc-rs1.18), withcc1.1.6 -> 1.2.60,cmake,dunce,rustls-pki-typesand newfind-msvc-toolsfollowing.pkg-config0.3.30 -> 0.3.34 is required by the newaws-lc-sys, which also probes for a system AWS-LC at build time and falls back to building from source. It no longer needs bindgen, so bindgen and its dependencies drop out.shlexstays on 1.x.rust/api/Cargo.lockis deleted. Cargo does not read it for workspace builds (rust/apiis a member ofrust/), but it still carried oldrustls-webpki/webpki-rootsversions, so lockfile scanners and audits flagged versions that never ship (an earlier audit of this exposure was misled by it). Dependabot discovers it through the/rustentry and opens PRs against it (e.g. #219), which have no effect on the build.The deployed API picks this up only when it is rebuilt and redeployed from main.
Testing
cargo check -p ghostkey-apiclean on this branch; existing CI (rust-api-tests.ymlbuilds and testsghostkey-api).[AI-assisted - Claude]
https://claude.ai/code/session_01Xxpwzw71GZJYts7ENMXYX2