Interview Prep/Docker/Image Security & Hardening

How do you manage Trivy false positives and accepted risks?

IntermediateProductionImage Security & Hardening
Answer

Use a .trivyignore file with CVE IDs, each with an expiry and justification comment, or VEX documents stating "not affected". Keep it in the repo so exceptions are reviewed in PRs.

# CVE-2024-XXXX  not reachable, no network parsing, review 2026-03-01 exp:2026-03-01
CVE-2024-XXXX

Rescan on a schedule since the DB changes daily.

All Docker questions Roadmap: Docker & containers

More on Image Security & Hardening