Safeguard
Infrastructure Security•

Best IaC security scanners for Terraform: Checkov, Trivy, KICS

Checkov, Trivy and KICS are the maintained open source Terraform scanners. tfsec has merged into Trivy and Terrascan is archived. Compare and choose.

Safeguard Security Team
5 min read

For Terraform, the maintained open source choices are Checkov, Trivy and KICS. tfsec has been folded into Trivy, and Terrascan was archived by its owner on 20 November 2025. Add Conftest if you want to write your own policies in Rego. Snyk IaC is the commercial option in this group.

Safeguard publishes this guide and sells a competing product, so we describe other tools only from their own documentation, as of 19 October 2026.

Key takeaways

  • Choose a scanner that reads your Terraform plan output, not only the HCL files, because plans resolve variables and modules.
  • Checkov documents plan scanning. Trivy and KICS cover Terraform, and their pages we read do not mention plan files specifically.
  • Do not start a new project on Terrascan, which is no longer maintained.
  • Run the scan on pull requests and fail only on the severities you have agreed to fix.

Which Terraform security scanners are still maintained?

Checkov, Trivy, KICS and Conftest all have active documentation, and Snyk IaC is a supported commercial product. tfsec "is now part of Trivy" and its repository says it will remain available for the time being, with engineering attention directed at Trivy. Terrascan's repository states "This project is no longer maintained."

How do the tools compare?

ToolType and licenseTerraform coverage (per docs)Other formats (per docs)Custom policies
CheckovOpen source, Apache-2.0Terraform, Terraform plan, Terraform JSON, OpenTofuCloudFormation, Kubernetes, Helm, Kustomize, Dockerfile, Bicep, ARM and CI workflow filesPython or YAML
Trivy (trivy config)Open sourceTerraform, auto detected in a directoryCloudFormation, ARM, Helm, Dockerfile, KubernetesRego custom checks
KICSOpen source, free, developed by CheckmarxTerraform and OpenTofuOver 20 types including Ansible, Pulumi, Bicep, Docker Compose and GitHub WorkflowsSee its queries docs
ConftestOpen source, RegoReads HCL and HCL2JSON, YAML, Dockerfile and many moreRego, with deny, violation and warn rules
Snyk IaCCommercialTerraformCloudFormation, Kubernetes, ARMNot covered on the page we read
TerrascanArchived, Apache 2.0Terraform HCL2CloudFormation, ARM, Kubernetes, Helm, Kustomize, DockerfileNot maintained

Checkov says it ships more than 750 predefined policies and can check against standards such as CIS and the AWS Foundations Benchmark.

How do I scan a Terraform plan?

With Checkov, run terraform init, then terraform plan -out tf.plan, then terraform show -json tf.plan > tf.json, and scan with checkov -f tf.json. The README notes that because the JSON is a single line, findings report line number 0 unless you reformat it with jq.

Scanning a plan catches values that only exist after Terraform resolves modules and variables. Scanning source catches problems earlier and points at the right file and line. Many teams do both.

How do I choose a Terraform scanner?

  1. Does it parse your plan JSON as well as your HCL?
  2. Does it include rules for your cloud (AWS, Azure, GCP) and for CIS style benchmarks?
  3. Can you write a policy for your own rule, and in which language?
  4. Does it also cover Kubernetes, Helm and Dockerfiles, so one tool serves the whole repo?
  5. Can you suppress a finding with a recorded reason in the code?
  6. Does it produce SARIF or another format your pull request tooling reads?
  7. Is it actively maintained?

Where does Safeguard fit?

Safeguard offers a CLI and local runner that keeps source on your machine, IDE extensions for VS Code, JetBrains and Cursor, and an MCP server. Use it alongside a Terraform scanner for the dependency side of your repos: the free scan at gold.safeguard.sh/scan checks up to 100 dependencies in your browser with no login.

Frequently asked questions

Is tfsec still maintained?

Its repository says it is now part of Trivy and will stay available for the time being. New work is going into Trivy.

Is Terrascan still maintained?

No. The repository was archived on 20 November 2025 and accepts no further updates, issues or pull requests.

Does Checkov support OpenTofu?

Its README lists OpenTofu templates among the formats it scans.

Can I write my own Terraform rules?

Yes. Checkov uses Python or YAML, Trivy and Conftest use Rego.

Should IaC scanning block a merge?

Start by blocking only high and critical findings. Add stricter gates after you have cleaned the backlog.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.