Quick revision
The short answer
I would have a platform team own a few central base images that are rebuilt automatically whenever the upstream OS or JDK is patched, and have every service image built on them with an automated rebuild triggered by each base update. The pipeline generates an SBOM and scans every image, images are signed and the cluster verifies signatures at deploy time, and rebuild coverage and deployment status are tracked as a metric so we can prove that all 200 services met the 48-hour window.
What to remember
In this answer, we designed an image supply chain that meets a 48-hour rebuild requirement for 200 services. A platform team owns central base images rebuilt automatically from upstream patches, service images pin those bases by digest and are rebuilt by automated pull requests that merge when tests pass, SBOMs and scanning run in both the pipeline and the registry, images are signed and verified at deploy time, and rebuild coverage of running images is tracked as a metric for every critical CVE.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I would have a platform team own a few central base images that are rebuilt automatically whenever the upstream OS or JDK is patched, and have every service image built on them with an automated rebuild triggered by each base update. The pipeline generates an SBOM and scans every image, images are signed and the cluster verifies signatures at deploy time, and rebuild coverage and deployment status are tracked as a metric so we can prove that all 200 services met the 48-hour window.
Why this question is asked
A critical CVE in a JDK or a base image library affects every service built on it at once. If each team rebuilds by hand when someone remembers, 200 services take weeks, and nobody can say which ones are still vulnerable. A 48-hour requirement forces a different design: the whole path from upstream patch to running pod must be automatic and observable. Interviewers ask this to see whether we can design that supply chain end to end. In this answer, we will go through the central base images, automated service rebuilds, SBOMs and scanning, signing and verification, and the metric that shows we are compliant.
1Why Manual Rebuilds Cannot Meet 48 Hours
Rebuilding an image is easy; rebuilding 200 of them in two days is a coordination problem. Teams are in different time zones, some services have no recent commits, some pipelines are broken, and some images use base images nobody remembers choosing. Even if everyone acts, we cannot prove it without knowing which base and JDK each running image contains.
So the design has to answer three questions automatically: which images contain the vulnerable component, how they get rebuilt without a person starting each build, and how we know the rebuilt version is what is running in production.
2Central Base Images Owned by a Platform Team
The first piece is a small set of base images owned by a platform team: for example, a JRE 21 image and a JRE 25 image, each on one chosen OS base, plus perhaps a distroless variant. Services are only allowed to build from these. That turns 200 different starting points into three or four.
The platform pipeline watches the upstream sources, the OS base and the JDK distribution, and rebuilds the base images automatically when a new patch is published, usually within hours. Each rebuilt base is tested with a few canary applications, scanned, signed, and pushed under a stable tag and a new digest, the content hash that uniquely identifies an image.
3Automated Service Rebuilds Triggered by Base Updates
Each service's Dockerfile or buildpack configuration references the base image by digest, so builds are reproducible. A dependency bot such as Renovate watches the base image tags and, when a new digest appears, opens a pull request in every service repository updating the digest. For critical CVEs, the policy is that these pull requests merge automatically once the service's tests pass, and the normal pipeline builds, tests and deploys the new image.
- Upstream JDK or OS patch releasedplatform pipeline notices
- Rebuild, test, scan and sign base imagesnew digest published
- Bot opens digest PRs in 200 repositories
- Service tests pass?YesAutomerge, build, scan, sign, deployNoAlert the owning team, track as at risk
- Cluster verifies signature at deployunsigned images rejected
- Inventory marks service as patchedrunning digest contains the fix
6 steps in order. Play them, or step through them one at a time.
Every step is automatic; people are only needed where tests fail.
Notice what this gives us. A service with no human activity still gets rebuilt, because the bot opens the change and CI merges it. A service whose tests fail is visible immediately as an open, failing pull request, which is exactly the list someone needs to follow up within the 48 hours.
4SBOMs and Scanning in the Pipeline and Registry
To know which images contain a vulnerable component, every image needs a software bill of materials (SBOM), a list of every package and library inside it with versions. Tools such as Syft or the CycloneDX plugins generate it during the build, and Spring Boot 3.3 and later can include and expose a CycloneDX SBOM for the application's own dependencies. The SBOM is stored alongside the image in the registry.
Scanning then happens in two places. In the pipeline, a scanner such as Trivy or Grype fails the build for critical vulnerabilities that have a fix available. In the registry, images are rescanned continuously against new CVE data, because an image that was clean yesterday may be vulnerable today. When a new critical CVE is announced, a query over the stored SBOMs answers which images, and so which services, contain it in minutes.
5Sign Images and Verify at Deploy Time
Automation is only trustworthy if we know the images in production came from it. So the pipeline signs each image after building and scanning, for example with Sigstore cosign, and attaches attestations such as the SBOM and the build provenance. In the cluster, an admission controller, such as Kyverno or the Sigstore policy controller, checks every pod's images and rejects any that are not signed by our pipeline key or identity.
This closes two gaps at once. Nobody can deploy an image built on a laptop that skipped the base image and the scan, and an attacker who pushes an image to the registry cannot get it scheduled. It also means that when we report a service as patched, the image running is provably the one our pipeline built.
6Track Rebuild Coverage as a Metric
Finally, the requirement is a deadline, so we measure against it. For each critical CVE, a dashboard shows how many of the 200 services are running an image built on the fixed base, how many have a rebuild in progress, and how many are blocked, with the time elapsed. The data comes from the registry (which digests contain the fix) joined with the cluster (which digests are running).
| State | Services | Action |
|---|---|---|
| Running fixed image | 184 | none |
| Rebuilt, deploying | 9 | watch rollout |
| Tests failing on new base | 5 | owning team paged |
| No pipeline or archived | 2 | platform team takes over or retires |
Between incidents, the same metric shows how long rebuilds normally take, so we can find slow pipelines and abandoned services before the next critical CVE forces the issue.
7Follow-up questions
What about vulnerabilities in application dependencies rather than the base image?
The same pipeline handles them through dependency bots on the build files, with the SBOM telling us which services include the vulnerable library. Fixes there sometimes need code changes, so the 48-hour target may need an exception process with a mitigation, such as a configuration change or a WAF rule, while the upgrade is prepared.
Why pin base images by digest rather than by tag?
A tag can move, so two builds of the same commit could produce different images, and we could not tell which base a running image used. A digest is fixed. The bot's pull request makes the change visible and reviewable, and the history shows exactly when each service picked up each base.
How do you avoid deploying 200 services at once?
The rebuilds can run in parallel, but deployments follow each service's normal rollout strategy, and the platform can stagger automerges in waves, critical customer-facing services first. 48 hours leaves room for a few hours of staggering while still finishing well within the window.
8Conclusion
In this answer, we designed an image supply chain that meets a 48-hour rebuild requirement for 200 services. A platform team owns central base images rebuilt automatically from upstream patches, service images pin those bases by digest and are rebuilt by automated pull requests that merge when tests pass, SBOMs and scanning run in both the pipeline and the registry, images are signed and verified at deploy time, and rebuild coverage of running images is tracked as a metric for every critical CVE.
Open with
I would make the whole path automatic and measurable, because 200 manual rebuilds will never fit in 48 hours. It starts with a platform team owning a few central base images, say JRE 21 and JRE 25 on one OS base, and services are only allowed to build from those.
Then, if they want more
The platform pipeline watches the upstream JDK and OS and rebuilds, tests, scans and signs the bases within hours of a patch. Services pin the base by digest, and a bot like Renovate opens a pull request in every repository when a new digest appears; for critical fixes those merge automatically when tests pass, and the normal pipeline deploys.
Failing pull requests are the exact list of services that need a person. Every image gets an SBOM at build time, stored in the registry, so when a CVE is announced we can query which services contain the component in minutes, and the registry rescans images continuously.
The pipeline signs images with cosign, and an admission controller in the cluster rejects unsigned images, so what runs is provably what we built. Finally, a dashboard joins registry digests with what is running in the cluster and shows per CVE how many services are patched, deploying or blocked, so we can prove compliance and chase the stragglers.
About this answer
- Last updated
- 12 November 2026
- Versions it names
- Spring Boot 3.3
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Kubernetes documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Your security team requires all Java images to be rebuilt within 48 hours of a critical...": https://scrivio-interview-library.netlify.app/spring-boot/containers-and-kubernetes/5dfeb910b9/