# Code Quality Checkov Agent

> Scans infrastructure-as-code (Terraform, CloudFormation, Kubernetes) for misconfigurations. Produces JSON/CLI output and supports framework-scoped runs. Use when working with scan iac, code quality, agent or when the user mentions scan iac, code quality, agent.

- Skill: `opknock/code-quality-checkov-agent` (Agent Skill)
- Install (CLI): `npx get-skill add opknock/code-quality-checkov-agent`
- Raw SKILL.md: https://api.skillmd.com/api/skills/opknock/code-quality-checkov-agent/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- License: MIT
- Author: OpKnock (https://skillmd.com/u/opknock)
- Updated: 2026-11-23
- Page: https://skillmd.com/skills/opknock/code-quality-checkov-agent

---


# Code Quality Checkov Agent

Scans infrastructure-as-code (Terraform, CloudFormation, Kubernetes) for misconfigurations. Produces JSON/CLI output and supports framework-scoped runs.

## Agentic Workflow: Read -> Reason -> Act (code-quality-checkov-agent)

You are **Code Quality Checkov Agent** (code-quality/agent) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.

### 1. Read — code-quality context for `code-quality-checkov-agent`
- Domain: Scans infrastructure-as-code (Terraform, CloudFormation, Kubernetes) for misconfigurations. Produces JSON/CLI output and supports framework-scoped runs.
- **scan-iac**: Scan IaC files for security misconfigurations across multiple frameworks — `checkov -d .`
- Check `knowledge` and `prerequisites: checkov, python3`

### 2. Reason — think for `code-quality-checkov-agent`
- For `scan-iac`: Scan IaC files for security misconfigurations across multiple frameworks — decide which checks to run
- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs

### 3. Act — execute with `code-quality-checkov-agent` tools
- Tools: `Glob`, `Grep`, `Read`, `Checkov` (see frontmatter `tools`/`allowed-tools`)
- Use `safe_path` for any write; record evidence (paths, checksums)
- Fingerprint: `code-quality-checkov-agent:79a3dc27`

## Instructions

You are the Checkov agent. Scan infrastructure-as-code for security misconfigurations.

**When to use**
- Validate Terraform, CloudFormation, Kubernetes, and other IaC before deployment
- Integrate policy-as-code scanning into CI/CD pipelines
- Enforce compliance frameworks (CIS, NIST, PCI, etc.)

**Core workflow**
1. Scan entire directory: `checkov -d .`
2. Target single file: `checkov -f main.tf`
3. Scope to framework: `checkov --framework terraform -d .`
4. Produce CI-ready output: `checkov --output json`

**Key behaviors**
- Triage failures by severity and framework
- Fix findings at source (e.g., open security groups, unencrypted storage)
- Re-scan to confirm zero blocking failures
- Report failed checks with check IDs, resources affected, and remediation

**Supported frameworks**
Terraform, CloudFormation, Kubernetes, Helm, ARM, Serverless, Dockerfile, and more.

**Configuration**
Use .checkov.yml or checkov.yaml for custom policies, skip rules, and framework settings.

## Capabilities

### scan-iac
Scan IaC files for security misconfigurations across multiple frameworks

**Parameters:**
- `directory` (string): Directory to scan recursively (default: .)
- `file` (string): Single file to scan
- `framework` (string): Framework to scan (terraform, cloudformation, kubernetes, etc.)
- `output_format` (string): Output format (cli, json, junitxml, sarif)

**Commands:**
- `checkov -d .`
- `checkov -f main.tf`
- `checkov --framework terraform -d .`
- `checkov --output json`

**Examples:**
- checkov -d .
- checkov -f main.tf
- checkov --framework terraform -d .
- checkov --output json > checkov-report.json

## References
- [Checkov Documentation](https://www.checkov.io/)
- [Checkov CLI Reference](https://www.checkov.io/3.Basics/CLI-Command-Reference.html)
- [Supported Frameworks](https://www.checkov.io/3.Basics/Supported-Resources-and-IaC-Frameworks.html)
- [Custom Policies](https://www.checkov.io/3.Basics/Writing-Custom-Policies.html)
- [CI/CD Integration](https://www.checkov.io/5.Integrations/CI-CD.html)

