ScriptsApr 15, 2026·2 min read

Checkov — Static Security Scanning for IaC and Containers

Checkov is a Bridgecrew static-analysis tool that scans Terraform, CloudFormation, Kubernetes, Helm, Dockerfile, and more for misconfigurations and policy violations before anything is deployed.

TL;DR
Checkov scans Terraform, CloudFormation, Kubernetes, and Docker configs for security misconfigurations before deployment.
§01

What it is

Checkov is a static analysis tool by Bridgecrew (now part of Palo Alto Networks) that scans infrastructure-as-code files for security misconfigurations and policy violations. It supports Terraform, CloudFormation, Kubernetes manifests, Helm charts, Dockerfiles, and more.

It targets DevOps engineers, platform teams, and security practitioners who want to catch cloud misconfigurations in code before anything is deployed to production.

§02

How it saves time or tokens

Checkov shifts security left by finding issues during development rather than after deployment. Running it in CI catches problems like open S3 buckets, overly permissive IAM policies, or unencrypted databases before they reach production. This avoids costly remediation cycles.

§03

How to use

  1. Install Checkov:
pipx install checkov
  1. Scan a directory of Terraform files:
checkov -d ./terraform
  1. Review the output for passed and failed checks, then fix the flagged resources.
§04

Example

# Install
pipx install checkov

# Scan Terraform directory
checkov -d ./terraform

# Scan a specific file
checkov -f main.tf

# Output as JSON for CI integration
checkov -d ./terraform -o json

# Skip specific checks
checkov -d ./terraform --skip-check CKV_AWS_18,CKV_AWS_21
§05

Related on TokRepo

Key considerations

When evaluating Checkov for your workflow, consider the following factors. First, assess whether your team has the technical prerequisites to adopt this tool effectively. Second, evaluate the maintenance burden against the productivity gains. Third, check community activity and documentation quality to ensure long-term viability. Integration with your existing toolchain matters more than feature count alone. Start with a small pilot project before rolling out across the organization. Monitor resource usage during the initial adoption phase to identify bottlenecks early. Document your configuration decisions so team members can onboard independently.

§06

Common pitfalls

  • Checkov may flag valid configurations as failures if your organization uses custom patterns; use inline skip comments or a config file to suppress false positives.
  • Scanning large mono-repos with thousands of IaC files can be slow; scope scans to specific directories.
  • Some checks require external context (e.g., variable values from tfvars) that Checkov cannot resolve statically.

Frequently Asked Questions

What IaC formats does Checkov support?+

Checkov supports Terraform (HCL and plan files), CloudFormation (YAML and JSON), Kubernetes manifests, Helm charts, Dockerfiles, ARM templates, Serverless Framework, and more. The full list is in the documentation.

Can I run Checkov in CI/CD pipelines?+

Yes. Checkov has exit codes that fail the pipeline when checks fail. It outputs JSON, JUnit XML, and SARIF formats for integration with GitHub Actions, GitLab CI, Jenkins, and other CI systems.

How do I write custom policies?+

Checkov supports custom policies written in Python or as simple YAML definitions. Python policies give full flexibility, while YAML policies use a declarative format for common attribute checks.

Is Checkov free?+

Checkov is open-source and free under the Apache 2.0 license. Bridgecrew/Prisma Cloud offers a commercial platform with additional features like drift detection and supply chain security.

How does Checkov compare to tfsec?+

Both scan Terraform for security issues. Checkov covers more IaC formats beyond Terraform. tfsec is Terraform-specific and has been absorbed into Trivy. Choose based on whether you need multi-format support.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets