A scan reports 300 CVEs in your base image. How do you triage?
IntermediateScenarioSecurity and scanning
Answer
Situation read → Raw counts are noise; exploitability and fixability matter.
What I'd do →
trivy image --severity HIGH,CRITICAL --ignore-unfixed app:1.8.2.- Separate OS packages from app dependencies and see which are actually in the runtime path.
- Rebuild on a newer base or move to slim/distroless to drop unused packages.
- Use VEX statements or
.trivyignorewith expiry and justification for accepted risks.
Why → Most CVEs live in packages the app never loads.
Interview tip → Fix by removing packages first, patching second.
More on Security and scanning
Add 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?AdvancedChoose a base image strategy for security across the company.Advanced