Terraform Security Scanning with Checkov
Beginnerv1.0.0
Scan Terraform configurations for security misconfigurations with Checkov — detect unencrypted resources, overly permissive IAM, public access, and missing logging.
Content
Overview
Checkov scans Terraform files (.tf) for over 750 security misconfigurations. It detects unencrypted storage, public access, missing logging, overly permissive IAM policies, and non-compliant network configurations — all before terraform apply.
How It Works
Step 1: Basic Terraform Scan
Step 2: Filter by Severity and Checks
Step 3: Output Formats
Common Terraform Findings
Step 4: Use Baseline for Existing Projects
Best Practices
- -Start with a baseline for existing projects to avoid blocking all PRs
- -Focus on CRITICAL/HIGH findings first — encrypt data, restrict access
- -Run
checkovbeforeterraform planin your workflow - -Use
--compactfor cleaner CI output (summary instead of full details) - -Integrate with pre-commit hooks for immediate feedback
Common Mistakes
- -Enabling all checks on a large existing project (hundreds of findings, overwhelming)
- -Skipping checks permanently without documented justification
- -Not scanning Terraform modules (pass
--download-external-modules true) - -Scanning only root modules, missing shared module misconfigurations
FAQ
Discussion
Loading comments...