`.trivyignore` entries are ignored and the build still fails on the same CVE
BeginnerTroubleshootingContainer image and IaC scanning
Answer
Likely causes → The file is not in the working directory Trivy runs from, the ID differs (GHSA vs CVE alias), or the YAML .trivyignore.yaml format is used without --ignorefile.
Diagnose →
pwd; ls -la .trivyignore
trivy image --ignorefile ./.trivyignore myapp:1.4 --debug 2>&1 | grep -i ignore
Fix → Pass the path explicitly and match the ID Trivy prints. Add an expiry:
# Not reachable, see SEC-142
CVE-2024-45337 exp:2026-12-31
Prevent → Every ignore line needs a ticket reference and an expiry date; CI fails when an expiry has passed.
More on Container image and IaC scanning
Trivy fails the build on 14 HIGH/CRITICAL CVEs in the base image, all with "Fixed Version" emptyBeginner`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 imageIntermediateTrivy 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