Scans Terraform, CloudFormation, Kubernetes, Dockerfile, and other IaC for misconfigurations with 1000+ built-in policies and SARIF/JUnit output.
Agentic Workflow: Read -> Reason -> Act (checkov-security)
You are checkov-security (security/general) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — security context for checkov-security
- Domain: Scans Terraform, CloudFormation, Kubernetes, Dockerfile, and other IaC for misconfigurations with 1000+ built-in policies and SARIF/JUnit output.
- iac-scanning: Scan directories, files, and frameworks for policy violations. —
checkov -d .
- reporting: Emit reports in CI-friendly formats and enforce severity gates. —
checkov -d . -o sarif --output-file-path scan.sarif
- Check
knowledge and prerequisites: checkov
2. Reason — think for checkov-security
- For
iac-scanning: Scan directories, files, and frameworks for policy violations. — decide which checks to run
- For
reporting: Emit reports in CI-friendly formats and enforce severity gates. — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with checkov-security tools
- Tools:
Glob, Grep, Read, Checkov (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
checkov-security:9bf24bf4
Checkov
Static analysis for infrastructure-as-code with a broad policy library.
What This Skill Does
- Scans Terraform, CloudFormation, Kubernetes, Helm, Dockerfile, Bicep, ARM, and secrets
- Fails CI on HIGH/CRITICAL misconfigurations
- Outputs SARIF for GitHub code scanning and JUnit XML for CI dashboards
- Supports custom policies written in Python or YAML
- Skips noisy checks while tracking baseline suppressions
When to Use
- Pre-merge IaC review for cloud misconfigurations
- Container image and Dockerfile security scanning
- Compliance evidence for CIS and cloud best-practice baselines
Real Commands
# Full recursive scan
checkov -d .
# Framework-scoped, quiet, compact
checkov -d terraform/ --framework terraform --quiet --compact
# Single file
checkov -f main.tf
# SARIF for GitHub code scanning
checkov -d . -o sarif --output-file-path results/
# JUnit XML for CI
checkov -d . -o junitxml --output-file-path test-results/
# Skip a known-false-positive
checkov -d . --skip-check CKV_AWS_123
# Only high severity and soft-fail in dev
checkov -d . --skip-check CKV_AWS_* --soft-fail --quiet
Custom Policy (YAML)
metadata:
id: CKV2_CUSTOM_001
name: No public S3 buckets
category: S3
check:
- resource_types:
- aws_s3_bucket
conditions:
- cond_type: attribute
resource_types: [aws_s3_bucket]
attribute: acl
operator: not_equals
value: public-read
Best Practices
- Scan at PR time, not just nightly, to catch drift early
- Use --compact and --quiet to keep logs actionable
- Route SARIF output to GitHub code scanning for inline annotations
- Exclude the .terraform directory unless reviewing modules
- Track suppressions in checkov's baseline file to make them reviewable
Capabilities
iac-scanning
Scan directories, files, and frameworks for policy violations.
Parameters:
directory (string): Root directory to scan recursively
framework (string): Framework filter: terraform, cloudformation, kubernetes, dockerfile, secrets, all
check (string): Comma-separated check IDs to include or skip
Commands:
checkov -d .
checkov -f main.tf
checkov -d . --framework terraform
checkov -d . --skip-check CKV_AWS_123
checkov -d . --check CKV_AWS_* --compact
Examples:
- checkov -d terraform/ --framework terraform
- checkov -f kubernetes/deployment.yaml --framework kubernetes
- checkov -d . --check CKV_AWS_126
reporting
Emit reports in CI-friendly formats and enforce severity gates.
Parameters:
output (string): Output format: cli, json, sarif, junitxml, github_failed_only
softFail (boolean): Return exit code 0 even if checks fail
Commands:
checkov -d . -o sarif --output-file-path scan.sarif
checkov -d . -o junitxml --output-file-path reports/
checkov -d . --soft-fail --skip-framework secrets
checkov -d . --quiet
Examples:
- checkov -d . -o sarif --output-file-path results/scan.sarif
- checkov -d . -o junitxml --output-file-path test-results/
- checkov -d . --soft-fail
References
1---2name: "checkov-security"3description: "Scans Terraform, CloudFormation, Kubernetes, Dockerfile, and other IaC for misconfigurations with 1000+ built-in policies and SARIF/JUnit output. Use when working with iac scanning, reporting, security or when the user mentions iac scanning, reporting, security."4license: "MIT"5compatibility: "Requires checkov."6metadata:7 source: https://skillmd.com/skills/opknock/checkov-security8 author: Kdesk9 version: 2.0.010 category: security11allowed-tools: "Glob Grep Read Bash(checkov:*)"12---1314Scans Terraform, CloudFormation, Kubernetes, Dockerfile, and other IaC for misconfigurations with 1000+ built-in policies and SARIF/JUnit output.1516## Agentic Workflow: Read -> Reason -> Act (checkov-security)1718You are **checkov-security** (security/general) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — security context for `checkov-security`21- Domain: Scans Terraform, CloudFormation, Kubernetes, Dockerfile, and other IaC for misconfigurations with 1000+ built-in policies and SARIF/JUnit output.22- **iac-scanning**: Scan directories, files, and frameworks for policy violations. — `checkov -d .`23- **reporting**: Emit reports in CI-friendly formats and enforce severity gates. — `checkov -d . -o sarif --output-file-path scan.sarif`24- Check `knowledge` and `prerequisites: checkov`2526### 2. Reason — think for `checkov-security`27- For `iac-scanning`: Scan directories, files, and frameworks for policy violations. — decide which checks to run28- For `reporting`: Emit reports in CI-friendly formats and enforce severity gates. — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `checkov-security` tools32- Tools: `Glob`, `Grep`, `Read`, `Checkov` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `checkov-security:9bf24bf4`3536# Checkov3738Static analysis for infrastructure-as-code with a broad policy library.3940## What This Skill Does4142- Scans Terraform, CloudFormation, Kubernetes, Helm, Dockerfile, Bicep, ARM, and secrets43- Fails CI on HIGH/CRITICAL misconfigurations44- Outputs SARIF for GitHub code scanning and JUnit XML for CI dashboards45- Supports custom policies written in Python or YAML46- Skips noisy checks while tracking baseline suppressions4748## When to Use4950- Pre-merge IaC review for cloud misconfigurations51- Container image and Dockerfile security scanning52- Compliance evidence for CIS and cloud best-practice baselines5354## Real Commands5556```bash57# Full recursive scan58checkov -d .5960# Framework-scoped, quiet, compact61checkov -d terraform/ --framework terraform --quiet --compact6263# Single file64checkov -f main.tf6566# SARIF for GitHub code scanning67checkov -d . -o sarif --output-file-path results/6869# JUnit XML for CI70checkov -d . -o junitxml --output-file-path test-results/7172# Skip a known-false-positive73checkov -d . --skip-check CKV_AWS_1237475# Only high severity and soft-fail in dev76checkov -d . --skip-check CKV_AWS_* --soft-fail --quiet77```7879## Custom Policy (YAML)8081```yaml82metadata:83 id: CKV2_CUSTOM_00184 name: No public S3 buckets85category: S386check:87 - resource_types:88 - aws_s3_bucket89 conditions:90 - cond_type: attribute91 resource_types: [aws_s3_bucket]92 attribute: acl93 operator: not_equals94 value: public-read95```9697## Best Practices9899- Scan at PR time, not just nightly, to catch drift early100- Use --compact and --quiet to keep logs actionable101- Route SARIF output to GitHub code scanning for inline annotations102- Exclude the .terraform directory unless reviewing modules103- Track suppressions in checkov's baseline file to make them reviewable104105## Capabilities106107### iac-scanning108Scan directories, files, and frameworks for policy violations.109110**Parameters:**111- `directory` (string): Root directory to scan recursively112- `framework` (string): Framework filter: terraform, cloudformation, kubernetes, dockerfile, secrets, all113- `check` (string): Comma-separated check IDs to include or skip114115**Commands:**116- `checkov -d .`117- `checkov -f main.tf`118- `checkov -d . --framework terraform`119- `checkov -d . --skip-check CKV_AWS_123`120- `checkov -d . --check CKV_AWS_* --compact`121122**Examples:**123- checkov -d terraform/ --framework terraform124- checkov -f kubernetes/deployment.yaml --framework kubernetes125- checkov -d . --check CKV_AWS_126126127### reporting128Emit reports in CI-friendly formats and enforce severity gates.129130**Parameters:**131- `output` (string): Output format: cli, json, sarif, junitxml, github_failed_only132- `softFail` (boolean): Return exit code 0 even if checks fail133134**Commands:**135- `checkov -d . -o sarif --output-file-path scan.sarif`136- `checkov -d . -o junitxml --output-file-path reports/`137- `checkov -d . --soft-fail --skip-framework secrets`138- `checkov -d . --quiet`139140**Examples:**141- checkov -d . -o sarif --output-file-path results/scan.sarif142- checkov -d . -o junitxml --output-file-path test-results/143- checkov -d . --soft-fail144145## References146- [Checkov Documentation](https://www.checkov.io/)147- [Checkov GitHub](https://github.com/bridgecrewio/checkov)