Scan an IaC directory

Find configuration mistakes in Terraform, Kubernetes and Helm code, from MEDIUM severity up.

trivy config --severity MEDIUM,HIGH,CRITICAL ./terraform

tool
trivy15 commands
tags
trivysecurityterraform

More trivy commands

  • trivy image --ignore-unfixed --severity HIGH,CRITICAL img:tag

    Skip vulnerabilities that have no fix yet, so you only see what you can actually patch.

  • trivy image --download-db-only

    Download the latest vulnerability database in advance, without scanning anything.

  • trivy fs .

    Scan the current directory for vulnerabilities.

  • trivy k8s --report summary cluster

    Run a security audit of the whole cluster (images, configs, RBAC) and show a summary.

  • trivy image --format sarif --output results.sarif myimage:tag

    Save scan results in SARIF format for CI and IDE integrations.

all 15 trivy commands