MCPcopy
hub / github.com/aquasecurity/trivy

github.com/aquasecurity/trivy @v0.72.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.72.0 ↗
9,107 symbols 45,022 edges 1,724 files 1,638 documented · 18%
README

GitHub Release Test Go Report Card License: Apache-2.0 GitHub Downloads Docker Pulls

📖 Documentation

Trivy (pronunciation) is a comprehensive and versatile security scanner. Trivy has scanners that look for security issues, and targets where it can find those issues.

Targets (what Trivy can scan):

  • Container Image
  • Filesystem
  • Git Repository (remote)
  • Virtual Machine Image
  • Kubernetes

Scanners (what Trivy can find there):

  • OS packages and software dependencies in use (SBOM)
  • Known vulnerabilities (CVEs)
  • IaC issues and misconfigurations
  • Sensitive information and secrets
  • Software licenses

Trivy supports most popular programming languages, operating systems, and platforms. For a complete list, see the Scanning Coverage page.

To learn more, go to the Trivy homepage for feature highlights, or to the Documentation site for detailed information.

Quick Start

Get Trivy

Trivy is available in most common distribution channels. The full list of installation options is available in the Installation page. Here are a few popular examples:

Trivy is integrated with many popular platforms and applications. The complete list of integrations is available in the Ecosystem page. Here are a few popular examples:

Canary builds

There are canary builds (Docker Hub, GitHub, ECR images and binaries) generated with every push to the main branch.

Please be aware: canary builds might have critical bugs, so they are not recommended for use in production.

General usage

trivy <target> [--scanners <scanner1,scanner2>] <subject>

Examples:

trivy image python:3.4-alpine

Result

https://github.com/user-attachments/assets/af1c11e7-d9c5-48af-8e05-cb34dfd6352a

trivy fs --scanners vuln,secret,misconfig myproject/

Result

https://github.com/user-attachments/assets/6b3894b7-77c5-4ffc-ac94-ffe6648a30dc

trivy k8s --report summary cluster

Result

k8s summary

FAQ

How to pronounce the name "Trivy"?

tri is pronounced like trigger, vy is pronounced like envy.

Want more? Check out Aqua

If you liked Trivy, you will love Aqua which builds on top of Trivy to provide even more enhanced capabilities for a complete security management offering.
You can find a high level comparison table specific to Trivy users here. In addition check out the https://aquasec.com website for more information about our products and services. If you'd like to contact Aqua or request a demo, please use this form: https://www.aquasec.com/demo

Community

Trivy is an Aqua Security open source project.
Learn about our open source work and portfolio here.
Contact us about any matter by opening a GitHub Discussion here

Please ensure to abide by our Code of Conduct during all interactions.

Extension points exported contracts — how you extend this code

ArtifactCache (Interface)
ArtifactCache uses local or remote cache [8 implementers]
pkg/cache/cache.go
VEX (Interface)
VEX represents Vulnerability Exploitability eXchange. It abstracts multiple VEX formats. Note: This is in the experiment [6 …
pkg/vex/vex.go
StaticPathAnalyzer (Interface)
StaticPathAnalyzer is an interface for analyzers that can specify static file paths instead of traversing the entire fil [22 …
pkg/fanal/analyzer/analyzer.go
Writer (Interface)
Writer defines the result write operation [15 implementers]
pkg/k8s/report/report.go
Driver (Interface)
Driver defines operations for OS package scan [21 implementers]
pkg/detector/ospkg/driver/driver.go
Backend (Interface)
Backend defines the interface for security scanning implementations. It can be either local.Service for standalone scann [15 …
pkg/scan/service.go
Writer (Interface)
Writer defines the result write operation [15 implementers]
pkg/report/writer.go
Writer (Interface)
Writer defines the result write operation [15 implementers]
pkg/compliance/report/report.go

Core symbols most depended-on inside this repo

Equal
called by 2133
pkg/dependency/parser/java/pom/artifact.go
GetMetadata
called by 1670
pkg/iac/scan/result.go
Range
called by 1113
pkg/iac/scan/result.go
Run
called by 986
pkg/plugin/plugin.go
String
called by 935
pkg/report/table/summary.go
GetAttribute
called by 715
pkg/iac/terraform/block.go
Join
called by 673
pkg/x/os/root.go
Context
called by 616
pkg/iac/terraform/block.go

Shape

Function 4,086
Method 3,236
Struct 1,501
TypeAlias 127
Interface 90
FuncType 64
Class 3

Languages

Go99%
Python1%
TypeScript1%

Modules by API surface

rpc/common/service.pb.go363 symbols
rpc/cache/service.twirp.go93 symbols
rpc/cache/service.pb.go86 symbols
rpc/scanner/service.twirp.go69 symbols
pkg/flag/options.go66 symbols
pkg/rpc/convert.go63 symbols
rpc/scanner/service.pb.go59 symbols
pkg/iac/scanners/terraform/parser/parser_test.go58 symbols
pkg/iac/terraform/attribute.go57 symbols
magefiles/magefile.go55 symbols
pkg/iac/terraform/block.go54 symbols
pkg/fanal/secret/scanner.go54 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

guzzlehttp/guzzle7.4.4 · 1×
pear/log1.13 · 1×
psr/log1.0 · 1×
buf.build/gen/go/bufbuild/bufplugin/protocolbuffers/gov1.36.11-20250718181 · 1×
buf.build/gen/go/bufbuild/protodescriptor/protocolbuffers/gov1.36.11-20250109164 · 1×
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/gov1.36.11-20260415201 · 1×
buf.build/gen/go/bufbuild/registry/connectrpc/gov1.20.0-202605070632 · 1×
buf.build/gen/go/bufbuild/registry/protocolbuffers/gov1.36.11-20260507063 · 1×
buf.build/gen/go/pluginrpc/pluginrpc/protocolbuffers/gov1.36.11-20241007202 · 1×
buf.build/go/appv0.2.1-0.20260407195 · 1×
buf.build/go/bufpluginv0.10.0 · 1×
buf.build/go/bufprivateusagev0.1.0 · 1×

For agents

$ claude mcp add trivy \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact