What it is

Trivy is a comprehensive security scanner from Aqua Security. It looks for security issues in container images, filesystems, Git repositories, virtual machine images and Kubernetes — and it finds OS packages and dependencies, known vulnerabilities (CVEs), infrastructure-as-code misconfigurations, leaked secrets and software licences, all in one binary with one command.

What it scans

  • Container images — every layer, every installed package
  • Filesystems and Git repos — your project, as it sits on disk
  • Kubernetes — clusters, workloads and their configs
  • Secrets — keys and tokens left in code or images
  • SBOM — a full list of what is inside, in one report

Install

Trivy is in most package managers. The quickest routes:

brew install trivy
# or run it from Docker, no install:
docker run aquasec/trivy

Binaries for Linux, macOS and Windows are on the releases page — see the repo.

Usage

Scan an image, then scan a project folder — the two commands cover most daily use:

trivy image python:3.12
trivy fs --scanners vuln,secret,misconfig myproject/

Output comes as a table or JSON, so it drops straight into CI pipelines and reports. It also scans a whole Kubernetes cluster: trivy k8s --report summary cluster.

Use it responsibly. Only scan images, repos and systems you own or are authorised to test.
View on GitHubAll tools