trivy
Scanner for vulnerabilities in container images, filesystems, and Git repositories, as well as for configuration issues.
More info →Options (4)
-s, --severitybooleanScan a Docker image filtering the output by severity
trivy image {{[-s|--severity]}} {{HIGH,CRITICAL}} {{alpine:3.15}}-f, --formatbooleanGenerate output with a SARIF template
trivy image {{[-f|--format]}} {{template}} {{[-t|--template]}} "{{@sarif.tpl}}" {{[-o|--output]}} {{path/to/report.sarif}} {{image:tag}}-t, --templatebooleanGenerate output with a SARIF template
trivy image {{[-f|--format]}} {{template}} {{[-t|--template]}} "{{@sarif.tpl}}" {{[-o|--output]}} {{path/to/report.sarif}} {{image:tag}}-o, --outputbooleanGenerate output with a SARIF template
trivy image {{[-f|--format]}} {{template}} {{[-t|--template]}} "{{@sarif.tpl}}" {{[-o|--output]}} {{path/to/report.sarif}} {{image:tag}}Examples (8)
Scan a Docker image for vulnerabilities and exposed secrets
trivy image image:tagScan a Docker image filtering the output by severity
trivy image [-s|--severity] HIGH,CRITICAL alpine:3.15Scan a Docker image ignoring any unfixed/unpatched vulnerabilities
trivy image --ignore-unfixed alpine:3.15Scan the filesystem for vulnerabilities and misconfigurations
trivy fs --security-checks vuln,config path/to/project_directoryScan a IaC (Terraform, CloudFormation, ARM, Helm, and Dockerfile) directory for misconfigurations
trivy config path/to/iac_directoryScan a local or remote Git repository for vulnerabilities
trivy repo path/to/local_repository_directory|remote_repository_URLScan a Git repository up to a specific commit hash
trivy repo --commit commit_hash repositoryGenerate output with a SARIF template
trivy image [-f|--format] template [-t|--template] "@sarif.tpl" [-o|--output] path/to/report.sarif image:tag