The scan iac command performs comprehensive security scanning of Infrastructure as Code templates using multiple security tools.
# Basic security scan (Checkov by default)
thothctl scan iac
# Multi-tool scan
thothctl scan iac -t checkov -t trivy -t opa
# Hard enforcement — exit 1 on violations
thothctl scan iac -t checkov -t opa --enforcement hard
--enforcement hard + --post-to-pr for automated pipelines| Scanner | Description |
|---|---|
| Checkov | Policy-as-code scanning with built-in rules |
| Trivy | Vulnerability and misconfiguration detection |
| KICS | Static analysis via Docker |
| OPA/Conftest | Custom Rego policy evaluation (static HCL + plan-based) |
Every scan produces:
scan_summary.md in the reports directory (always generated)--post-to-pr is set)thothctl scan iac
thothctl scan iac -t checkov -t trivy -t opa --enforcement hard --html-reports-format simple
# Static HCL analysis with Conftest
thothctl scan iac -t opa -o "policy_dir=my-policies"
# Plan-based evaluation with OPA
thothctl scan iac -t opa -o "mode=opa,decision=terraform/analysis/authz"
check iac - Structure validationinventory iac - Component inventorydocument iac - Documentation generation