scan_directory_with_checkov
Scan a project directory with Checkov to detect security misconfigurations and compliance violations across all Infrastructure as Code files. Supports Terraform, Kubernetes, CloudFormation, Dockerfile, and more.
Instructions
Scan an entire project directory with Checkov for IaC security issues.
This tool scans all Infrastructure as Code files in a directory for security misconfigurations and compliance violations using Checkov.
Unlike scan_with_checkov which scans code snippets, this tool scans the actual project directory to find issues across all IaC files.
Supported file types:
Terraform (.tf, .tfvars)
CloudFormation (.yaml, .yml, .json)
Kubernetes (.yaml, .yml)
Dockerfile
ARM templates (.json)
Bicep (.bicep)
Serverless framework (.yml, .yaml)
Helm charts (.yaml, .yml)
GitHub Actions (.yml, .yaml)
GitLab CI (.yml, .yaml)
Ansible (.yml, .yaml)
Args: directory_path: Path to the directory to scan (relative or absolute) severity_threshold: Minimum severity level to report (LOW, MEDIUM, HIGH, CRITICAL)
Returns: A dictionary with security findings from Checkov
Note: Checkov must be installed and available in PATH. Install with: - pip: pip install checkov - pipx: pipx install checkov
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| return_output | No | Return full output instead of saving to file (default: False) | |
| directory_path | Yes | Path to the directory to scan | |
| severity_threshold | No | Minimum severity threshold (LOW, MEDIUM, HIGH, CRITICAL) | MEDIUM |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |