alxayo/sec-check/checkov-security-scan

Claude Code and agent skill by alxayo/sec-check

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"},{"type":"config","description":"Configuration overrides"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Scan Infrastructure as Code (IaC) for security misconfigurations and compliance violations using Checkov. (1) Primary use for Terraform, CloudFormation, Kubernetes manifests, Dockerfiles, Helm charts, ARM/Bicep templates, GitHub Actions, GitLab CI, and CI/CD pipelines. (2) Detects cloud misconfigurations, exposed secrets, overly permissive IAM policies, unencrypted storage, public access risks, container security issues. (3) Use for IaC security audits, compliance scanning (CIS, SOC2, HIPAA, PCI-DSS), pre-deployment validation, CI/CD security gates. Do NOT use for application source code vulnerabilities (use bandit, graudit) or dependency/package audits (use guarddog, dependency-check).

Install

npx vskill@latest install alxayo/sec-check/checkov-security-scan

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

Checkov Security Scanning Skill

This skill enables scanning Infrastructure as Code (IaC) for security misconfigurations and compliance violations using Checkov - an open-source static analysis tool by Bridgecrew/Palo Alto Networks that covers 20+ frameworks with 1000+ built-in security checks.

Key Distinction: Checkov detects IaC misconfigurations (insecure cloud resource configurations). For application source code vulnerabilities, use bandit (Python) or graudit (multi-language). For dependency audits, use guarddog or dependency-check.

Quick Reference

TaskCommand
Scan a directorycheckov -d /path/to/iac/
Scan a specific filecheckov -f main.tf
Scan Terraform onlycheckov -d . --framework terraform
Scan Kubernetes manifestscheckov -d ./k8s --framework kubernetes
Scan Dockerfilecheckov -f Dockerfile --framework dockerfile
JSON output for automation-o json
SARIF output for CI/CD-o sarif
List all available checkscheckov --list
Skip specific checks--skip-check CKV_AWS_1,CKV_DOCKER_7
Fail only on HIGH/CRITICAL--hard-fail-on HIGH,CRITICAL

When to Use This Skill

PRIMARY USE CASES:

  • Audit Terraform configurations for AWS, Azure, GCP, and other cloud providers
  • Scan Kubernetes manifests for container security issues
  • Check Dockerfiles for security best practices
  • Validate CloudFormation templates before deployment
  • Scan Helm charts and Kustomize configurations
  • Audit GitHub Actions, GitLab CI, and other CI/CD workflows
  • Compliance scanning against CIS benchmarks, SOC2, HIPAA, PCI-DSS
  • Pre-commit/pre-deployment security gates

DO NOT USE FOR:

  • Application source code vulnerabilities → use bandit (Python) or graudit
  • Dependency/package audits → use guarddog or dependency-check
  • Shell script security → use shellcheck
  • Runtime security scanning → use specialized runtime tools

Decision Tree: Choosing the Right Scan

What are you scanning?
│
├── Infrastructure as Code (IaC)?
│ ├── Terraform (.tf, .tf.json) → checkov -d . --framework terraform
│ ├── Kubernetes manifests → checkov -d . --framework kubernetes
│ ├── Dockerfile → checkov -f Dockerfile --framework dockerfile
│ ├── CloudFormation (.yaml/.json) → checkov -d . --framework cloudformation
│ ├── Helm charts → checkov -d . --framework helm
│ ├── ARM/Bicep → checkov -d . --framework arm,bicep
│ └── GitHub Actions → checkov -d . --framework github_actions
│
├── CI/CD configuration?
│ ├── GitHub Actions → checkov --framework github_actions
│ ├── GitLab CI → checkov --framework gitlab_ci
│ ├── Azure Pipelines → checkov --framework azure_pipelines
│ └── CircleCI/BitBucket → checkov --framework circleci_pipelines,bitbucket_pipelines
│
├── Python/JavaScript source code?
│ └── Use bandit or graudit instead
│
└── Third-party dependencies?
└── Use guarddog or dependency-check instead

Prerequisites

Checkov must be installed. If not available, install it:

bash
# Install via pip (recommended)
pip install checkov
# Or use pipx for isolated install
pipx install checkov
# Or use Homebrew (macOS/Linux)
brew install checkov
# Or use Docker (isolated, no local install)
docker pull bridgecrew/checkov
alias checkov='docker run --tty --rm --volume "$(pwd):/tf" --workdir /tf bridgecrew/checkov'
# Verify installation
checkov --version

Troubleshooting Installation:

bash
# If pip install fails, ensure Python 3.8+
python --version
# If permissions issues occur
pip install --user checkov
# Check if checkov is in PATH
which checkov || echo "Add to PATH or use full path"

Core Scanning Commands

Scan a Directory
bash
# Scan all IaC files in a directory (auto-detects frameworks)
checkov -d /path/to/infrastructure/
# Scan current directory
checkov -d .
# Scan with compact output (no code blocks)
checkov -d . --compact
Scan Specific Files
bash
# Scan a single Terraform file
checkov -f main.tf
# Scan multiple files
checkov -f main.tf -f variables.tf -f outputs.tf
# Scan a Dockerfile
checkov -f Dockerfile --framework dockerfile
Framework-Specific Scans
bash
# Terraform only
checkov -d . --framework terraform
# Kubernetes manifests
checkov -d ./k8s --framework kubernetes
# CloudFormation templates
checkov -d ./cfn --framework cloudformation
# Dockerfile
checkov -f Dockerfile --framework dockerfile
# Helm charts
checkov -d ./helm-chart --framework helm
# GitHub Actions workflows
checkov -d .github/workflows --framework github_actions
# Multiple frameworks
checkov -d . --framework terraform,kubernetes,dockerfile
Output Formats
bash
# Default CLI output
checkov -d .
# JSON output for parsing
checkov -d . -o json
# SARIF for GitHub/GitLab Security
checkov -d . -o sarif
# JUnit XML for CI/CD test reporting
checkov -d . -o junitxml
# Multiple outputs simultaneously
checkov -d . -o cli -o json -o sarif --output-file-path console,results.json,results.sarif
# CycloneDX SBOM format
checkov -d . -o cyclonedx_json

Available Check Categories

Checkov includes 1000+ built-in checks across multiple categories.

Check ID Prefixes by Provider
PrefixProvider/CategoryExample Checks
CKV_AWS_*Amazon Web ServicesIAM, S3, EC2, RDS, Lambda
CKV_AZURE_*Microsoft AzureVMs, Storage, AKS, SQL
CKV_GCP_*Google Cloud PlatformGKE, Cloud Storage, IAM
CKV_DOCKER_*DockerfilesImage security, USER directive
CKV_K8S_*KubernetesPod security, RBAC, network policies
CKV_GHA_*GitHub ActionsWorkflow security, secrets
CKV_GITLABCI_*GitLab CIPipeline security
CKV_SECRET_*Secrets DetectionHardcoded credentials
CKV_ALI_*Alibaba CloudAlibaba-specific resources
CKV_OCI_*Oracle CloudOCI resources
CKV_TF_*Terraform GeneralProvider-agnostic checks
CKV_OPENAPI_*OpenAPI/SwaggerAPI specification security
CKV_ANSIBLE_*AnsiblePlaybook security
CKV_ARGO_*Argo WorkflowsWorkflow security
Security Check Categories
CategoryDescriptionMITRE ATT&CK
EncryptionData at rest/transit encryptionT1530
Access ControlIAM policies, RBAC, authenticationT1078
Network SecuritySecurity groups, firewalls, ingress/egressT1046, T1190
Public AccessPublicly accessible resourcesT1190
Logging & MonitoringAudit logs, CloudTrail, CloudWatchT1562
Secrets ManagementHardcoded credentials, API keysT1552
Container SecurityPrivileged containers, root usersT1610
ComplianceCIS benchmarks, SOC2, HIPAA, PCI-DSS-
Example Checks by Framework

Terraform (AWS):

Check IDDescription
CKV_AWS_1Ensure IAM policies don't allow full "-" admin privileges
CKV_AWS_2Ensure ALB protocol is HTTPS
CKV_AWS_3Ensure EBS is encrypted by default
CKV_AWS_18Ensure S3 access logging is enabled
CKV_AWS_19Ensure S3 bucket has server-side encryption
CKV_AWS_20Ensure S3 bucket is not publicly readable
CKV_AWS_21Ensure S3 bucket versioning is enabled
CKV_AWS_23Ensure every security group has a description
CKV_AWS_24Ensure no security group allows ingress from 0.0.0.0/0 to port 22
CKV_AWS_25Ensure no security group allows ingress from 0.0.0.0/0 to port 3389

Kubernetes:

Check IDDescription
CKV_K8S_1Do not admit containers sharing host PID namespace
CKV_K8S_2Do not admit privileged containers
CKV_K8S_3Do not admit containers running as root
CKV_K8S_8Ensure liveness probe is configured
CKV_K8S_9Ensure readiness probe is configured
CKV_K8S_21Default namespace should not be used
CKV_K8S_22Use read-only filesystem for containers
CKV_K8S_28Ensure seccomp profile is set
CKV_K8S_35Prefer using secrets for sensitive environment variables

Dockerfile:

Check IDDescription
CKV_DOCKER_1Ensure port 22 (SSH) is not exposed
CKV_DOCKER_2Ensure HEALTHCHECK instructions are added
CKV_DOCKER_3Ensure USER instruction is added (non-root)
CKV_DOCKER_7Ensure base image uses non-latest tag
CKV_DOCKER_8Ensure package manager caches are cleaned
CKV_DOCKER_9Ensure COPY is used instead of ADD
CKV_DOCKER_10Ensure secrets are not stored in Dockerfile
CKV_DOCKER_11Ensure base image is pinned using digest

GitHub Actions:

Check IDDescription
CKV_GHA_1Ensure run step does not use shell injection
CKV_GHA_2Ensure actions use pinned SHA
CKV_GHA_3Ensure workflow run is not triggered on workflow_run
CKV_GHA_4Ensure self-hosted runners are not used
CKV_GHA_7Ensure ACTIONS_ALLOW_UNSECURE_COMMANDS is not set
CKV2_GHA_1Ensure top-level permissions are read-only

Selective Check Scanning

bash
# Run only specific checks
checkov -d . -c CKV_AWS_1,CKV_AWS_2,CKV_AWS_3
# Run checks by type
checkov -d . --check-type terraform
# Skip specific checks
checkov -d . --skip-check CKV_AWS_1,CKV_DOCKER_7
# Skip paths
checkov -d . --skip-path tests/ --skip-path .terraform/
# List all available checks
checkov --list
# Filter checks by framework
checkov --list --framework terraform

Severity Filtering

bash
# Only fail on HIGH and CRITICAL severity
checkov -d . --hard-fail-on HIGH,CRITICAL
# Soft fail on LOW and MEDIUM (exit 0)
checkov -d . --soft-fail-on LOW,MEDIUM
# Show only failed checks
checkov -d . --quiet
# Always exit 0 (soft fail all)
checkov -d . --soft-fail

Configuration File

Create .checkov.yaml in your project root:

yaml
# Framework selection
framework:
- terraform
- dockerfile
- kubernetes
# Skip specific checks
skip-check:
- CKV_AWS_1
- CKV_DOCKER_7
# Skip paths
skip-path:
- tests/
- .terraform/
- examples/
# Output settings
output: cli
compact: true
quiet: false
# Severity configuration
soft-fail-on:
- LOW
- MEDIUM
hard-fail-on:
- HIGH
- CRITICAL
# Terraform settings
download-external-modules: true
external-modules-download-path: .external_modules
evaluate-variables: true
var-file:
- variables.tfvars
# For CI/CD
soft-fail: false

Create config from CLI args:

bash
checkov --create-config .checkov.yaml

Workflow for Security Audit

Quick Scan (1-2 minutes)
bash
# Quick scan of IaC directory
checkov -d . --compact
# Focus on critical issues only
checkov -d . --hard-fail-on HIGH,CRITICAL --quiet
Comprehensive Audit (3-5 minutes)
bash
# Step 1: Full scan with all frameworks
checkov -d . -o cli -o json --output-file-path console,full-report.json
# Step 2: Review critical findings
checkov -d . --hard-fail-on CRITICAL --quiet
# Step 3: Framework-specific deep dive
checkov -d ./terraform --framework terraform -o cli
checkov -d ./k8s --framework kubernetes -o cli
checkov -f Dockerfile --framework dockerfile -o cli
Pre-Deployment Validation
bash
# Scan Terraform plan (most accurate for runtime config)
terraform init
terraform plan -out=tfplan
terraform show -json tfplan > tfplan.json
checkov -f tfplan.json --framework terraform_plan
# Scan with external modules
checkov -d . --download-external-modules true

CI/CD Integration

GitHub Actions
yaml
name: IaC Security Scan
on: [push, pull_request]

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
8
Repository forks
4
7-day trend score
11

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 2 Apr 2026, 7 months ago.

Extension points

  • hookPre/post lifecycle hooks
  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/alxayo/sec-check/checkov-security-scan/badge)](https://verified-skill.com/skills/alxayo/sec-check/checkov-security-scan)

Something wrong with this skill or its page? Tell us.