Trivy fails the build on 14 HIGH/CRITICAL CVEs in the base image, all with "Fixed Version" empty
BeginnerTroubleshootingContainer image and IaC scanning
Answer
Likely causes → The distro has not shipped patches (status affected / will_not_fix), so no upgrade will clear them and the gate blocks forever.
Diagnose →
trivy image --severity HIGH,CRITICAL --format json myapp:1.4 \
| jq -r '.Results[].Vulnerabilities[]? | select(.FixedVersion==null or .FixedVersion=="") | "\(.VulnerabilityID) \(.PkgName) \(.Status)"'
Fix → Gate only on fixable issues and track the rest:
trivy image --ignore-unfixed --severity HIGH,CRITICAL --exit-code 1 myapp:1.4
Consider a slimmer base (distroless, Chainguard/Wolfi, -slim) to drop unused packages entirely.
Prevent → Policy: block on fixable HIGH/CRITICAL, report unfixable, rebuild images weekly so patches land automatically.
More on Container image and IaC scanning
`FATAL ... failed to download vulnerability DB: ... TOOMANYREQUESTS: retry-after` from Trivy in CIIntermediateTrivy in an air-gapped runner fails with `failed to download vulnerability DB` even though you copied `db.tar.gz`AdvancedTrivy and Grype report different CVE counts for the same imageIntermediate`.trivyignore` entries are ignored and the build still fails on the same CVEBeginnerTrivy reports a critical CVE in a Go binary built from your own code, in package `stdlib`IntermediateImage scan passes in CI but the registry scanner (ECR enhanced scanning / Harbor) shows criticals a week laterBeginner