Choose a base image strategy for security across the company.
AdvancedScenarioSecurity and scanning
Answer
Situation read → Hundreds of images, inconsistent bases.
What I'd do → Standardize on minimal maintained bases (distroless, Chainguard, Docker Hardened Images, or Alpine/Debian slim), mirror them, rebuild nightly, sign, SBOM and attach attestations. Block unapproved registries in admission control.
Why → Fewer packages mean fewer CVEs and faster patching, and a central pipeline gives one patch point.
Interview tip → Explain the tradeoff: debuggability versus attack surface.
More on Security and scanning
A scan reports 300 CVEs in your base image. How do you triage?IntermediateAdd vulnerability scanning to CI so critical findings block the merge.BeginnerWhy is mounting `/var/run/docker.sock` into a container dangerous?IntermediateA developer asks for `--privileged`. What do you do?IntermediateHarden a container run command for a stateless web API.IntermediateA pentester got root inside a container. How bad is it?Advanced