Anything you do to Trivy twice should be automated. This walks the path from a manual install to a repeatable, pipeline-driven setup.
1. Install it reproducibly
brew install trivy # or: docker run aquasec/trivy
trivy --version2. Describe the desired state
Config file to fail only on HIGH/CRITICAL and ignore unfixed CVEs.
# trivy.yaml
severity:
- HIGH
- CRITICAL
vulnerability:
ignore-unfixed: true
exit-code: 13. Run it from CI
Fail the build on fixable high/critical CVEs.
- uses: aquasecurity/trivy-action@0.24.0
with:
image-ref: ghcr.io/${{ github.repository }}:${{ github.sha }}
severity: HIGH,CRITICAL
ignore-unfixed: true
exit-code: 1Want 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.