An image passed scanning three weeks ago and runs in production. A new critical CVE is published today. What happens next?
IntermediateScenarioContainer and IaC Security
Answer
Situation read → Vulnerability data changes daily. A clean scan is a point-in-time statement.
What I'd do →
- Rely on stored SBOMs: query them for the affected package (
grype sbom:./sbom.jsonor your inventory DB). - List running workloads using the image digest:
kubectl get pods -A -o jsonpath='{..image}'. - Assess exploitability, internet exposure and available fix.
- Rebuild with the patched base, run tests, and roll out via the normal pipeline.
- Add temporary mitigation (WAF rule, network restriction) if the fix takes days.
Why → SBOM-based lookup answers "are we affected" in minutes instead of hours.
Interview tip → Log4Shell is the example everyone remembers.
More on Container and IaC Security
A team asks whether to use `ubuntu`, `alpine` or a distroless base image. How do you advise?Beginner`trivy image` shows 300 vulnerabilities in your app image. How do you bring this down?BeginnerA Dockerfile runs the app as root. How do you fix it and prove the fix?IntermediateCheckov fails a Terraform PR because an S3 bucket allows public access. What do you change?BeginnerHow do you set up image scanning so nothing vulnerable reaches production?IntermediateYou find `ENV DB_PASSWORD=...` and `ARG NPM_TOKEN` in a Dockerfile. What is wrong and how do you fix it?Beginner