Video in progress

A critical CVE is announced in the base image. How do you update 200 images within a day?

A process prepared in advance solves this: base images are centralized, it is known which base each image was built from, and a base update automatically triggers rebuild and deploy PRs. Without that, updating 200 images in one day is nearly impossible.

📖 Answer

What you do on the day of the incident:

  1. Determine the impact: which images have the vulnerable package? A registry scanner or an SBOM store (Dependency-Track, for example) answers this in minutes. If SBOMs were not stored, you have to rescan all 200 images.
  2. Is it actually used? If the CVE is in curl but the Java service never runs it, the risk is low. That sets priority, but you still have to update, because an auditor does not like the explanation "it is not used".
  3. Update the base: rebuild the internal base image with the new patch.
  4. A mass rebuild: the service code does not change, only the base digest. The pipelines start automatically.
  5. Deploy: with the usual canary, but with accelerated gates.

The real answer to the question is what you prepare in advance:

  • keep the number of base images minimal: one or two internal java-21-runtime images. If every team picks a different base in its own Dockerfile, this day is hell;
  • a label on every image saying which base digest it was built from;
  • Renovate or a similar bot opens a PR for the base update and auto-merges it if CI is green;
  • every service pipeline is green and in a deployable state. If you rebuild a service that has not been deployed for three months, all the other accumulated changes ship with it;
  • a distroless or minimal base: the number of packages the scanner can find shrinks on its own.

The metric: "patch latency", the time from the CVE announcement until all prod images are updated. If that is weeks, there is no process.

Java-specific: CVEs in the JDK itself are fixed in the quarterly CPU releases. Updating the base image on that schedule should be routine work, not an emergency.