Skip to content

Test that the compromised eMudhra CAs are rejected - #57

Merged
coretl merged 3 commits into
DiamondLightSource:mainfrom
coretl:emudhra-test
Oct 22, 2026
Merged

coretl merged 3 commits into
DiamondLightSource:mainfrom
coretl:emudhra-test

Conversation

@coretl

@coretl coretl commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Add a container test that the image rejects the compromised eMudhra intermediate CAs described at https://emudhra.we-have-a-problem.com/.

tests/emudhra.sh is run inside the built image by a new CI step. Against dv-g3b-emudhra.we-have-a-problem.com it requires a certificate error from curl (exit 60, so a network failure does not pass) and from uvx with its bundled roots. Negative controls on a throwaway branch showed each check fails without its fix (uv 0.12.24; ca-certificates 20260601 from a pre-fix snapshot). The page's second host and uvx --system-certs passed on those unpatched images, so they are left out.

The test should fail on images with uv older than 0.13.4 or ca-certificates older than 20260816ubuntu0.*, and pass on the current ones. Before this branch's updates the Dockerfile used uv:0.12 with ubuntu:resolute-20260912; it now uses uv:0.13 with ubuntu:resolute-20261006. The Ubuntu base tag predates the ca-certificates fix (published 2026-10-20), so the fix reaches the image through the apt-get install ca-certificates layer at build time, and a stale cached build would fail this test, which is the point.

It passes in CI on amd64 and arm64, and also adds the actions/checkout step the workflow needs to mount tests/. It depends on the third party checker host being reachable from the runners.

AI Disclaimer

The code and this description were generated with AI and reviewed/tweaked by the author.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MWyja3hE36C6yQkTsTfU5Y

Run curl and uvx (bundled and system roots) against the hosts published at
https://emudhra.we-have-a-problem.com/ and require a certificate error.

Assisted-by: Claude Sonnet 5.5
Negative controls (uv 0.12.24, and ca-certificates 20260601 from a
pre-fix snapshot) showed that dv-g3b-aaa-emudhra and uvx --system-certs
pass on unpatched images, so they cannot catch a regression. Keep curl
and bundled-roots uvx against dv-g3b-emudhra.

Assisted-by: Claude Opus 5.5
@coretl
coretl merged commit bff9b92 into DiamondLightSource:main Oct 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant