Trivy rewards a little discipline. These are the practices that keep it maintainable as a team and a codebase grow.
The practices
- Gate on HIGH/CRITICAL with ignore-unfixed, then tighten over time
- Scan images, IaC and filesystems - not just one surface
- Cache and periodically refresh the DB in CI
What good looks like
Config file to fail only on HIGH/CRITICAL and ignore unfixed CVEs.
# trivy.yaml
severity:
- HIGH
- CRITICAL
vulnerability:
ignore-unfixed: true
exit-code: 1Anti-patterns to retire
- Failing on unfixed CVEs and drowning in noise
- Scanning only images and ignoring IaC and secrets
- Never updating the vulnerability DB in air-gapped runners
Want senior help putting Trivy to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.