From db3bf4f649cc34a3ac96fbbed5031dc3d818970d Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com> Date: Wed, 21 Oct 2026 17:08:11 +0200 Subject: [PATCH 1/2] fix(deps): Distrust the compromised eMudhra root (webpki-roots 1.0.10) The Rust HTTP clients (reqwest rustls-tls, ureq, the MongoDB driver) trust the roots compiled in from webpki-roots, which still included "emSign ECC Root CA - G3" (Mozilla bug 2083449: eight intermediates under it have trivially recoverable keys). The host-bundle mounts in prod cannot reach those roots; only a rebuild can. - webpki-roots 1.0.10 (root removed), rustls-webpki 0.103.16. - Every final stage fails the build if the Debian store still ships the root; this also stops CI from reusing a cached layer with the old ca-certificates (20230311+deb12u1, which trusts the forged chain; 20250419~deb12u2 rejects it). Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 16 ++++++++-------- Dockerfile.agent | 4 ++++ Dockerfile.dashboard | 4 ++++ Dockerfile.mcp | 4 ++++ 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 37b39ac..2a27dec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2740,7 +2740,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots 1.0.6", + "webpki-roots 1.0.10", ] [[package]] @@ -3575,7 +3575,7 @@ dependencies = [ "tokio-util", "typed-builder", "uuid", - "webpki-roots 1.0.6", + "webpki-roots 1.0.10", ] [[package]] @@ -4643,7 +4643,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 1.0.6", + "webpki-roots 1.0.10", ] [[package]] @@ -4809,9 +4809,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.15" +version = "0.103.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2" +checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281" dependencies = [ "ring", "rustls-pki-types", @@ -6712,14 +6712,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.6", + "webpki-roots 1.0.10", ] [[package]] name = "webpki-roots" -version = "1.0.6" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfaf3c063993ff62e73cb4311efde4db1efb31ab78a3e5c457939ad5cc0bed" +checksum = "1c1c8e20c8a38fc7d65abfe74eb7280e4aa667e8eec8bc84996d2874810748d9" dependencies = [ "rustls-pki-types", ] diff --git a/Dockerfile.agent b/Dockerfile.agent index ddff4f8..67dbe8c 100644 --- a/Dockerfile.agent +++ b/Dockerfile.agent @@ -80,6 +80,10 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ ca-certificates libssl3 git curl python3 python3-pip npm cppcheck \ && rm -rf /var/lib/apt/lists/* +# eMudhra (Mozilla bug 2083449, Oct 2026): fail the build if the image still +# trusts the compromised root. Also keeps a cached layer with the old store +# from being reused. +RUN test ! -e /usr/share/ca-certificates/mozilla/emSign_ECC_Root_CA_-_G3.crt # Cargo resolves Rust lockfiles and metadata for the SBOM stage. Installed # system-wide so the unprivileged user can run it; its caches go to the user's diff --git a/Dockerfile.dashboard b/Dockerfile.dashboard index d8b9f3a..01c1d87 100644 --- a/Dockerfile.dashboard +++ b/Dockerfile.dashboard @@ -27,6 +27,10 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends ca-certificates libssl3 curl \ && rm -rf /var/lib/apt/lists/* \ && useradd --uid 10001 --user-group --no-create-home --shell /usr/sbin/nologin app +# eMudhra (Mozilla bug 2083449, Oct 2026): fail the build if the image still +# trusts the compromised root. Also keeps a cached layer with the old store +# from being reused. +RUN test ! -e /usr/share/ca-certificates/mozilla/emSign_ECC_Root_CA_-_G3.crt WORKDIR /app COPY --from=builder /app/target/dx/compliance-dashboard/release/web/compliance-dashboard /app/compliance-dashboard diff --git a/Dockerfile.mcp b/Dockerfile.mcp index 8a6d133..08a36f5 100644 --- a/Dockerfile.mcp +++ b/Dockerfile.mcp @@ -19,6 +19,10 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends ca-certificates libssl3 curl \ && rm -rf /var/lib/apt/lists/* \ && useradd --uid 10001 --user-group --no-create-home --shell /usr/sbin/nologin app +# eMudhra (Mozilla bug 2083449, Oct 2026): fail the build if the image still +# trusts the compromised root. Also keeps a cached layer with the old store +# from being reused. +RUN test ! -e /usr/share/ca-certificates/mozilla/emSign_ECC_Root_CA_-_G3.crt COPY --from=builder /app/target/release/compliance-mcp /usr/local/bin/compliance-mcp -- 2.54.1 From 3934fcb6be5d807acf75cbae2eba2e91892e7fff Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com> Date: Wed, 21 Oct 2026 17:18:28 +0200 Subject: [PATCH 2/2] chore(audit): Ignore zip extract() advisories we do not reach RUSTSEC-2026-0367/0368/0369 (zip 2.4.2) affect ZipArchive::extract() and ZipStreamReader::extract() only. ingest/archive.rs extracts entry by entry, skips paths enclosed_name() rejects and writes file contents only, so no symlinks or Unix modes are ever applied. They failed this PR's security audit although the PR does not touch zip; zip 9.x is a separate follow-up. Co-Authored-By: Claude Opus 5.5 --- .cargo/audit.toml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.cargo/audit.toml b/.cargo/audit.toml index 741d212..b2518ec 100644 --- a/.cargo/audit.toml +++ b/.cargo/audit.toml @@ -1,5 +1,16 @@ [advisories] ignore = [ + # zip 2.4.2 — RUSTSEC-2026-0367/0368/0369 (published 2026-10): SUID/SGID + # bits, symlink targets and permissions applied through symlinks, all in + # ZipArchive::extract() / ZipStreamReader::extract(). We never call + # those: ingest/archive.rs walks the entries itself, skips any path that + # enclosed_name() rejects, and writes file contents only — no symlinks, + # no Unix modes. The fix is zip >= 9.0.0, a major jump from our "2". + # FOLLOW-UP: bump zip to 9.x in its own PR (backlog), then drop these. + "RUSTSEC-2026-0367", + "RUSTSEC-2026-0368", + "RUSTSEC-2026-0369", + # hickory-proto 0.25.x pulled in transitively via mongodb → hickory-resolver. # MongoDB 3.x has not yet released with hickory-resolver 0.26.x, so we cannot # upgrade past this without a mongodb release. Both are DNS-layer DoS vectors -- 2.54.1