Repository navigation
Stop trusting compromised eMudhra roots in CI images - #897
eliottness wants to merge 4 commits into
Conversation
Upgrade the default CI image to alpine 3.24.3, use a plain alpine image for the no-op reliability job, and patch the async-profiler-build base Dockerfiles (CA bundle, Node 22.23.4, botocore bundle, JDK cacerts) so the next REBUILD_IMAGES run publishes clean images (IR-62343). Jira: APPSEC-71294
|
@copilot resolve the merge conflicts in this pull request |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
Image-level verification remains incomplete: full builds and certificate scans were not independently confirmed, so this review does not establish that rebuilt CI images contain none of the compromised roots.
🤖 Bits Code Review · Commit 8715e05
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8715e053d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…inal image Add the 2026 Datadog copyright line to the five base and build-deploy files this PR modifies (AGENTS.md: add a copyright line to files missing one). Restore .gitlab/benchmarks/.gitlab-ci.yml and child.gitlab-ci.yml to main: the merge-queue pipeline for this PR failed in benchmarks-inputs-guard, the job whose image this PR had moved from the Datadog-built benchmarking-platform-tools-ubuntu image to Docker Hub alpine. Those jobs only echo variables, so they go back to their original image; that image is now a follow-up (rebuild at source in DataDog/images). Jira: APPSEC-71294 (parent APPSEC-71273)
|
@jbachorik thanks for picking this up. Two changes since your merge-queue attempt, both in 2c6ec87 (GitHub-verified):
The description now uses the repo template and lists every follow-up in full. GitHub checks are re-running on the new head. Once they are green it can go back into the queue. If |
The merge-queue pipelines show that Datadog's GitLab runners only admit images from approved registries: the first attempt failed with "ValidatingAdmissionPolicy 'third-party-registry' ... Disallowed image(s): alpine:3.24.3@sha256:be2656061b53" (job 2174477532), and the second failed in the reliability child pipeline, whose skip job this PR had also moved to Docker Hub alpine. Restore .gitlab-ci.yml and .gitlab/build-deploy/.gitlab-ci.yml to main's version. Moving the default image to Alpine 3.24 is a follow-up: it needs a mirrored alpine in registry.ddbuild.io first. Jira: APPSEC-71294 (parent APPSEC-71273)
|
Merge-queue rejection, root cause from the GitLab logs: the runners only admit images from approved registries.
44cbb26 restores |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
Build pipeline has failing jobs for 71b6d63: What to do next?
DetailsSince those jobs are not marked as being allowed to fail, the pipeline will most likely fail. |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
Build pipeline has failing jobs for 69e36e5: What to do next?
DetailsSince those jobs are not marked as being allowed to fail, the pipeline will most likely fail. |
|
Merge-queue attempts 3 and 4 (on
All 84 PR checks pass on |
What does this PR do?:
Stops this repository's CI images from trusting emSign ECC Root CA - G3 and AAA Certificate Services, the roots behind the compromised eMudhra intermediates (incident IR-62343). The APPSEC-71273 ledger lists 16 impacted image references here; images CI never builds or pulls are left alone.
.gitlab/base/Dockerfile(Debian base images): installs currentca-certificates, points awscli's botocore bundle at the system bundle, replaces Debian's packaged Node (which embeds the old roots) with the checksum-verified upstream Node 22.23.4 archive, and deletes both roots from the SDKMAN JDKcacerts..gitlab/base/Dockerfile.musl: upgradesca-certificates, points awscli's botocore bundle at the system bundle, and deletes both roots from the JDKcacerts..gitlab/base/el7/Dockerfile: Oracle Linux 7 has no fixedca-certificatespackage, so both roots are removed from the p11-kit trust source (every other object and its purpose restrictions are kept) and the trust store is re-extracted; both roots are also deleted from the JDKcacerts..gitlab/base/el8/Dockerfile:dnf update ca-certificates+update-ca-trust extract, and both roots deleted from the JDKcacerts.The base-image Dockerfile changes take effect when REBUILD_IMAGES republishes the async-profiler-build images and the pinned digests are updated (7 references are fixed this way).
Motivation:
Incident IR-62343: CI images that trust these two roots keep the exposure from the compromised eMudhra intermediates. Jira APPSEC-71294 (parent APPSEC-71273).
Additional Notes:
alpine:3.24.3was denied by thethird-party-registryadmission policy (job 2174477532), and the reliability child pipeline failed because its skip job had also moved to Docker Hub alpine..gitlab-ci.yml,.gitlab/build-deploy/.gitlab-ci.ymland the benchmark files are therefore back to main's version; this PR now only changes the base-image Dockerfiles.alpine:3.22.1(.gitlab-ci.yml,.gitlab/build-deploy/.gitlab-ci.yml): moving to Alpine 3.24 needs a mirrored alpine 3.24 image inregistry.ddbuild.iofirst, because the runners reject Docker Hub images.benchmarking-platform-tools-ubuntu:newest(DataDog/images; newest and latest still resolve to the bad digest 1e27d877);ci/async-profiler-build:v137281788-datadog-ci(rebuild.gitlab/Dockerfile.datadog-civia.gitlab/scripts/rebuild-images.sh, then update the pin);ci/async-profiler-build-amd64/-arm64benchmark images (rebuild.gitlab/benchmarks/docker/Dockerfile, then update the pins);slack-notifier:v91289620-4ec922a-latest(DataDog/slack-notifier; latest is the same bad digest 06b24f39).eclipse-temurin:21-jdk-alpine@sha256:c98f0d2e171c(JDK 21 is pinned on purpose; the current digest still trusts the roots, patched viaDockerfile.muslabove) andalmalinux:8@sha256:9f355ae942d6(pins the shipped binaries' glibc 2.28 floor; AlmaLinux 9 and 10 also still trust the roots; patched viael8/Dockerfileabove).486234852809.dkr.ecr.us-east-1.amazonaws.com/images/docker:24.0.4-gbi-focal(pull access denied: no basic auth credentials for that ECR registry).How to test the change?:
Every new image reference and every changed Dockerfile was pulled or built and scanned with the eMudhra scanner, which checks every file in the image for the two roots' public keys; all returned empty hits. GitHub CI is not fully green on 44cbb26:
test-linux-glibc-amd64 (8-ibm, debug, regular)was cancelled at its 180-minute timeout after hanging inCTimerSamplerTest(cstack=dwarf), run 40387577386. The same commit passed that job on earlier runs, and the GitHub workflows do not read the Dockerfiles this PR changes. The GitLab jobs that build the base images run in the merge-queue pipeline and on REBUILD_IMAGES.For Datadog employees:
credentials of any kind, I've requested a security review (run the
dd:platform-security-reviewskill, or file a request via the PSEC review form).
bewairealso runs automatically on every PR.Note for the owner: this PR changes the base images used to build the shipped binaries, so it touches the publishing pipeline; no PSEC review has been requested yet.
Unsure? Have a question? Request a review!