Interview Prep/Docker/Security and scanning

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 →

  1. trivy image --severity HIGH,CRITICAL --ignore-unfixed app:1.8.2.
  2. Separate OS packages from app dependencies and see which are actually in the runtime path.
  3. Rebuild on a newer base or move to slim/distroless to drop unused packages.
  4. Use VEX statements or .trivyignore with 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.

All Docker questions Roadmap: Docker & containers

More on Security and scanning