Trivy is an open-source security scanner that finds CVEs, misconfigurations, secrets and license issues across container images, filesystems, Git repos, IaC and live Kubernetes clusters.
Why teams use it
- One tool for images, IaC, secrets and Kubernetes scanning
- Fast, with an easy exit-code gate for CI
- No account or SaaS required to get started
Install it
brew install trivy # or: docker run aquasec/trivy
trivy --versionA first working config
Config file to fail only on HIGH/CRITICAL and ignore unfixed CVEs.
# trivy.yaml
severity:
- HIGH
- CRITICAL
vulnerability:
ignore-unfixed: true
exit-code: 1Run and verify
trivy image ghcr.io/acme/web:1.0
trivy fs --scanners vuln,secret,misconfig .
trivy k8s --report summary clusterMistakes to avoid early
- 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.