ghtier
← IaC and container config

Trivy

Scans images, filesystems, repositories and IaC for vulnerabilities, misconfigurations, secrets and licenses.

github.com/aquasecurity/trivy ↗
Stars
★ 38,859
License
Apache-2.0
Language
Go
Last push
30 Oct 2026
OpenSSF Scorecard
6.4 / 10
ghtier ratingRated 4 of 5, Recommended4/5 · Recommended

One binary for vulnerabilities, IaC misconfigurations, secrets and SBOMs, but the March 2026 compromise of its releases and Actions means pinning it carefully.

Note: this page is AI generated. Read the tool's own repository and documentation, linked at the bottom, before you rely on it.

How it works

Trivy is a Go binary with several scanners. The vulnerability scanner reads OS package databases and language lockfiles and matches them against a vulnerability database it downloads. The misconfiguration scanner runs the checks that used to be tfsec over Terraform, CloudFormation, Kubernetes, Helm and Dockerfiles. A secret scanner and a license scanner run over the same files.

trivy fs and trivy repo scan source, trivy image scans a container image, and trivy config runs only the misconfiguration checks. Custom checks are written in Rego.

Output is a table, JSON, SARIF, or an SBOM in CycloneDX or SPDX. --exit-code and --severity turn it into a gate.

What it catches

  • CVEs in OS packages and language dependencies, in images and lockfiles
  • Terraform and Kubernetes misconfigurations such as public buckets and privileged pods
  • Dockerfiles that run as root or use latest tags
  • Secrets in files and image layers

Run it

brew install trivy
trivy fs --severity HIGH,CRITICAL --exit-code 1 .
trivy config .
trivy image ghcr.io/my-org/my-image:tag

In GitHub Actions

- uses: aquasecurity/trivy-action@<sha> # v0.36.0
  with:
    scan-type: fs
    severity: CRITICAL,HIGH
    exit-code: "1"

What leaves your machine

Downloads the vulnerability and check databases from OCI registries (mirror.gcr.io, ghcr.io) on each run unless cached. It sends anonymous usage data and checks check.trivy.dev for updates unless --disable-telemetry and --skip-version-check are set.

Limits

  • In March 2026 a stolen bot token released a backdoored Trivy and moved the tags of trivy-action and setup-trivy. Pin the Action to a commit you have checked and verify release signatures.
  • Database downloads slow cold CI runs and can hit registry rate limits; cache them.
  • Its IaC checks are fewer than Checkov's or KICS's, and custom checks need Rego.

Related tools

Related incidents

GitHub stats as of 30 Oct 2026. How ratings work.