Trivy is an open-source security scanner developed by Aqua Security and hosted by the CNCF (Cloud Native Computing Foundation). The name is a portmanteau of "tri" (three) and "vy" (vulnerabilities); it originally started by scanning three targets (OS packages, application dependencies, IaC), but it has since evolved into a comprehensive scanner that supports a variety of targets, including containers, filesystems, Git repositories, VM images, and Kubernetes.
Trivy has four main scan targets. Vulnerabilities detects known CVEs by referencing NVD, the GitHub Advisory Database, and others. Misconfigurations checks Terraform, Dockerfile, and Kubernetes manifests for violations of security best practices. Secrets detects whether API keys, passwords, certificates, and the like are exposed in code. Licenses checks whether open-source components comply with their licenses.
Trivy is very simple to install and use. It is distributed as a single binary that runs without dependencies, and you can scan immediately with a simple command such as trivy image nginx:latest. It can download and use the vulnerability DB even in offline environments, and supports various output formats (JSON, SARIF, CycloneDX SBOM). It integrates easily with all major CI/CD platforms such as GitHub Actions, GitLab CI, and Jenkins.
Trivy Operator is a component that continuously performs security scans inside a Kubernetes cluster. It automatically scans all workloads deployed to the cluster and stores the results as Kubernetes CRDs (Custom Resource Definitions). This lets you monitor security posture with kubectl or Prometheus/Grafana. Trivy is rated highly for speed, accuracy, and ease of use compared with other scanners such as Clair and Grype.