Which scan targets and scanners does Trivy support?
IntermediateConceptTool Internals and Comparisons
Answer
Targets: image, fs, repo, rootfs, config (IaC only), k8s (live cluster), sbom, and vm. Scanners, selected with --scanners: vuln, misconfig, secret, license.
trivy fs --scanners vuln,secret,misconfig .
trivy config --severity HIGH,CRITICAL ./terraform
trivy image --format cyclonedx --output sbom.json app:1.4.2
trivy sbom sbom.json
trivy k8s --report summary cluster
--exit-code 1 --severity CRITICAL --ignore-unfixed is the usual CI gate. tfsec's checks now live in Trivy's misconfiguration scanner.
More on Tool Internals and Comparisons
How does Trivy get its vulnerability data, and how do you run it air-gapped?AdvancedHow does Falco capture system calls?AdvancedHow does OPA evaluate a Rego policy? Give an example.IntermediateWhat are the ways to deploy OPA, and what are decision logs?AdvancedHow does Vault achieve high availability with integrated storage?AdvancedWhat are Vault secrets engines and auth methods? What changes in KV v2?Intermediate