Repository navigation
Run under /bin/sh, accept scip-rust index, distrust eMudhra roots - #55
Merged
Merged
Conversation
- Add BusyBox to the image so /bin/sh exists for callers that run commands in the container through a shell. Its wget and ssl_client applets are disabled because BusyBox does not verify TLS certificates. - scip-rust: drop a leading `index` argument. Releases up to v0.0.5 ignored their arguments and callers still run `scip-rust index`; rust-analyzer treated `index` as the project path and wrote an empty index. A directory named `index` can still be indexed as `./index`. - Distrust the emSign ECC Root CA - G3 and Comodo AAA Services roots in the image's CA bundle after the eMudhra intermediate CA key compromise (https://emudhra.we-have-a-problem.com/). nixos-26.05 still ships cacert 3.126; drop the override once it has 3.131.1 or later.
- ci: in the docker job, also index through `--entrypoint /bin/sh` with `scip-rust index`, and check that the image has no BusyBox wget or ssl_client. - flake: the pinned cacert is 3.123 and already distrusts Comodo AAA Services root for TLS. cacert 3.131.1 drops emSign ECC Root CA - G3, so the override fails the build after a nixpkgs bump to it.
keegancsmith
approved these changes
Oct 27, 2026
keegancsmith
left a comment
There was a problem hiding this comment.
LGTM. Haven't used dockerTools much in nix, but got lots of nix experience. This fix makes a lot of sense, but may be worth inspecting the built image just to make sure it doesn't trust the bad cert.
EG I don't think it would work this way, but not impossible: pkgs.git could have in its nix store closure the bad certs somehow. But yeah, I don't think thats how certs work in general for nix, they are expected to be managed outside of the pkg.
chrapkowski-sg
enabled auto-merge (squash)
October 27, 2026 21:13
chrapkowski-sg
added a commit
that referenced
this pull request
Oct 27, 2026
) * Run under /bin/sh, accept `scip-rust index`, distrust eMudhra roots - Add BusyBox to the image so /bin/sh exists for callers that run commands in the container through a shell. Its wget and ssl_client applets are disabled because BusyBox does not verify TLS certificates. - scip-rust: drop a leading `index` argument. Releases up to v0.0.5 ignored their arguments and callers still run `scip-rust index`; rust-analyzer treated `index` as the project path and wrote an empty index. A directory named `index` can still be indexed as `./index`. - Distrust the emSign ECC Root CA - G3 and Comodo AAA Services roots in the image's CA bundle after the eMudhra intermediate CA key compromise (https://emudhra.we-have-a-problem.com/). nixos-26.05 still ships cacert 3.126; drop the override once it has 3.131.1 or later. * Test the /bin/sh path in CI and correct the cacert comment - ci: in the docker job, also index through `--entrypoint /bin/sh` with `scip-rust index`, and check that the image has no BusyBox wget or ssl_client. - flake: the pinned cacert is 3.123 and already distrusts Comodo AAA Services root for TLS. cacert 3.131.1 drops emSign ECC Root CA - G3, so the override fails the build after a nixpkgs bump to it. * Use gitMinimal in the image - pkgs.git pulls in Perl and Mozilla::CA for git-send-email. That separate CA bundle still trusts emSign ECC Root CA - G3; gitMinimal leaves both out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The image cannot be used by callers that run commands in the container through a shell: it has no
/bin/sh. Callers that still runscip-rust index(the invocation releases up to v0.0.5 accepted) get an empty index, because the argument is passed to rust-analyzer as the project path. The image's CA bundle (nss-cacert 3.123, from the pinned nixpkgs) also still trusts the emSign root behind the compromised eMudhra intermediate CAs (https://emudhra.we-have-a-problem.com/): git and cargo in the image complete a TLS handshake with https://dv-g3b-emudhra.we-have-a-problem.com/.Changes
/bin/shand basic utilities. Itswgetandssl_clientapplets are disabled because BusyBox does not verify TLS certificates.scip-rust: drop a leadingindexargument, documented in the script. A directory namedindexcan still be indexed as./index.emSign ECC Root CA - G3andComodo AAA Services rootin the image's CA bundle viacacert.override { blacklist = … }. The pinned cacert already distrusts the Comodo root for TLS, so that entry is defence in depth. cacert 3.131.1 no longer contains the emSign root, so the override fails the build after a nixpkgs bump to it and should be removed then.Verification (local image build)
maindocker run --entrypoint /bin/sh … -c 'scip-rust index'/bin/sh)docker run … scip-rust indexdocker run -v "$PWD:/work" <image>(README usage),scip-rust ./index,scip-rust index --output X <path>andscip-rust --output X <path>all work./bin/sh+scip-rust index: 98 documents, 75,866 occurrences,crates/core/main.rspresent.shellcheckandformattingflake checks pass.--entrypoint /bin/shwithscip-rust index, and checks that the image has no BusyBoxwgetorssl_client. Both steps pass locally; the TLS-client check fails on an image that haswget.