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.
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.
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.
How to use
- Install Checkov:
pipx install checkov
- Scan a directory of Terraform files:
checkov -d ./terraform
- Review the output for passed and failed checks, then fix the flagged resources.
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
Related on TokRepo
- AI Tools for Security — Security scanning and compliance tools
- AI Tools for DevOps — DevOps automation and infrastructure tools
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.
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
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.
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.
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.
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.
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)
- Checkov GitHub— Scans Terraform, CloudFormation, Kubernetes, Helm, and Dockerfile
- Checkov Documentation— Static analysis for IaC misconfigurations
- Prisma Cloud Code Security— Part of Palo Alto Networks Prisma Cloud
Related on TokRepo
Discussion
Related Assets
Moodle — Open-Source Learning Management System
The most widely used open-source learning platform, providing course management, assessments, and collaboration tools for educators and organizations worldwide.
Sylius — Headless E-Commerce Framework on Symfony
An open-source headless e-commerce platform built on Symfony and API Platform, designed for developers who need a customizable and API-first commerce solution.
Akaunting — Free Self-Hosted Accounting Software
A free, open-source online accounting application built on Laravel for small businesses and freelancers to manage invoices, expenses, and financial reports.