trivy Command Examples

Scanner for vulnerabilities in container images, file systems, and Git repositories, as well as for configuration issues. More information: https://aquasecurity.github.io/trivy.

trivy image {{image:tag}}

trivy image --severity {{HIGH,CRITICAL}} {{alpine:3.15}}

trivy image --ignore-unfixed {{alpine:3.15}}

trivy fs --security-checks {{vuln,config}} {{path/to/project_directory}}

trivy config {{path/to/iac_directory}}

trivy repo {{path/to/local_repository_directory|remote_repository_URL}}

trivy repo --commit {{commit_hash}} {{repository}}

trivy image --format {{template}} --template "{{@sarif.tpl}}" -o {{path/to/report.sarif}} {{image:tag}}