Back to Trivy

First steps with Trivy

docs/getting-started/index.md

0.70.03.2 KB
Original Source

First steps with Trivy

Get Trivy

Trivy is available in most common distribution channels. The complete 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:

General usage

Trivy's Command Line Interface pattern follows its major concepts: targets (what you want to scan), and scanners (what you want to scan for):

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

Examples

Scan a container image from a registry with the default scanner, which is the Vulnerabilities scanner:

bash
trivy image python:3.4-alpine
<video width="1000" muted controls> <source src="https://user-images.githubusercontent.com/1161307/171013513-95f18734-233d-45d3-aaf5-d6aec687db0e.mov" type="video/mp4" /> </video>

Scan a local code repository, for vulnerabilities, exposed secrets and misconfigurations:

bash
trivy fs --scanners vuln,secret,misconfig /path/to/myproject
<video width="1000" muted controls> <source src="https://user-images.githubusercontent.com/1161307/171013917-b1f37810-f434-465c-b01a-22de036bd9b3.mov" type="video/mp4" /> </video>

Scan a Kubernetes cluster, with all available scanners, and show a summary report:

bash
trivy k8s --report summary cluster

For a more complete introduction, check out the basic Trivy Demo: https://github.com/itaysk/trivy-demo

Learn more

Now that you are up and ready, here are some resources to help you deepen your knowledge:

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