Agent skill

Implementing Infrastructure As Code Security Scanning

by mukul975 in mukul975/Anthropic-Cybersecurity-Skills

Implements automated security scanning for Infrastructure as Code using Checkov, tfsec, and KICS to detect misconfigurations in Terraform, CloudFormation, Kubernetes manifests, and Helm charts, plus…

Apache-2.0Auto-check passedDevOps & Cloud

Install Implementing Infrastructure As Code Security Scanning

skills CLI
$ npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-infrastructure-as-code-security-scanning -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mukul975/Anthropic-Cybersecurity-Skills implementing-infrastructure-as-code-security-scanning --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mukul975/Anthropic-Cybersecurity-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/implementing-infrastructure-as-code-security-scanning .claude/skills/implementing-infrastructure-as-code-security-scanning && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
implementing-infrastructure-as-code-security-scanning
GitHub stars
34k
Token cost
~2.2k tokens
SKILL.md length
461 words
Files
8 (incl. scripts, references, assets)
Skills in repo
637
Repo updated
First seen
Licence
Apache-2.0

At a glance

Implements automated security scanning for Infrastructure as Code using Checkov, tfsec, and KICS to detect misconfigurations in Terraform, CloudFormation, Kubernetes manifests, and Helm charts, plus…

  • Works in 5 steps: Run Checkov Against Terraform Files → Integrate IaC Scanning into GitHub Actions → Create Custom Checkov Policies → …
  • Validating cloud infrastructure before deployment
  • SKILL.md covers When to Use, Prerequisites, Workflow and Key Concepts, plus 3 more sections
  • Runs Python scripts from its folder; calls terraform, docker and pip

What it does

Implementing Infrastructure As Code Security Scanning is an agent skill from mukul975/Anthropic-Cybersecurity-Skills. Implements automated security scanning for Infrastructure as Code using Checkov, tfsec, and KICS to detect misconfigurations in Terraform, CloudFormation, Kubernetes manifests, and Helm charts, plus policy-based governance and CI/CD integration. Use when validating cloud infrastructure before deployment or blocking insecure changes (public S3 buckets, open security groups) in pull requests.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including scripts, reference files and assets (for example `assets/template.md`, `references/api-reference.md` and `references/standards.md`).

It sits in DevOps & Cloud, covering Infrastructure as code and Container orchestration. It works with Terraform, Kubernetes, Helm and AWS CloudFormation. The repository describes itself as: 817 structured cybersecurity skills for AI agents · Mapped to 6 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND, NIST AI RMF & MITRE F3 (Fight Fraud) · agentskills.io…. The licence is Apache-2.0.

When your agent uses it

  • Validating cloud infrastructure before deployment
  • Blocking insecure changes (public S3 buckets
  • Open security groups) in pull requests

Example prompts

  • “Use the implementing-infrastructure-as-code-security-scanning skill to implement automated security scanning for Infrastructure as Code using…”
  • “/implementing-infrastructure-as-code-security-scanning”

Requirements

  • Python 3
  • Docker

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Run Checkov Against Terraform Files
  2. Integrate IaC Scanning into GitHub Actions
  3. Create Custom Checkov Policies
  4. Configure Baseline and Suppressions
  5. Scan Kubernetes Manifests and Helm Charts

What it can do on your machine

Read from SKILL.md and the folder at commit 54a7988. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • terraform
    • docker
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker and pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Implementing Infrastructure As Code Security Scanning loads about 2.2k tokens when it runs, and up to ~3.7k if it reads all its reference files. Until then it costs about 112 tokens; SKILL.md has 461 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~112
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from mukul975/Anthropic-Cybersecurity-Skills at commit 54a7988, republished under its Apache-2.0 licence (© mukul975). 461 words, ~2,171 tokens.

Download SKILL.mdSave it as .claude/skills/implementing-infrastructure-as-code-security-scanning/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
implementing-infrastructure-as-code-security-scanning
description
Implements automated security scanning for Infrastructure as Code using Checkov, tfsec, and KICS to detect misconfigurations in Terraform, CloudFormation, Kubernetes manifests, and Helm charts, plus policy-based governance and CI/CD integration. Use when validating cloud infrastructure before deployment or blocking insecure changes (public S3 buckets, open security groups) in pull requests.
domain
cybersecurity
subdomain
devsecops
tags
devsecops, cicd, iac-security, checkov, tfsec, terraform, secure-sdlc
version
1.0.0
author
mahipal
license
Apache-2.0
nist_csf
PR.PS-01, GV.SC-07, ID.IM-04, PR.PS-04
mitre_attack
T1195, T1554, T1059.004, T1078.004, T1530

Implementing Infrastructure as Code Security Scanning

When to Use

  • When provisioning cloud infrastructure with Terraform, CloudFormation, or Pulumi and needing automated security validation
  • When compliance frameworks require evidence of infrastructure configuration review before deployment
  • When preventing common cloud misconfigurations like public S3 buckets, open security groups, or unencrypted storage
  • When establishing guardrails that block insecure infrastructure changes in pull requests
  • When managing multi-cloud environments requiring consistent security policies across AWS, Azure, and GCP

Do not use for scanning application source code (use SAST), for monitoring already-deployed infrastructure drift (use cloud security posture management tools), or for container image vulnerability scanning (use Trivy).

Prerequisites

  • Checkov v3.x installed (pip install checkov) or tfsec installed
  • Terraform, CloudFormation, or Kubernetes IaC files in the repository
  • CI/CD pipeline with access to IaC directories
  • Bridgecrew API key (optional, for Checkov platform integration)

Workflow

Step 1: Run Checkov Against Terraform Files
bash
# Scan all Terraform files in a directory
checkov -d ./terraform/ --framework terraform --output cli --output json --output-file-path ./results

# Scan specific file
checkov -f main.tf --output json

# Scan Terraform plan (more accurate for dynamic values)
terraform init && terraform plan -out=tfplan
terraform show -json tfplan > tfplan.json
checkov -f tfplan.json --framework terraform_plan

# Scan with specific checks only
checkov -d ./terraform/ --check CKV_AWS_18,CKV_AWS_19,CKV_AWS_20

# Skip specific checks
checkov -d ./terraform/ --skip-check CKV_AWS_145,CKV2_AWS_6
Step 2: Integrate IaC Scanning into GitHub Actions
yaml
# .github/workflows/iac-security.yml
name: IaC Security Scan

on:
  pull_request:
    paths:
      - 'terraform/**'
      - 'cloudformation/**'
      - 'k8s/**'

jobs:
  checkov:
    name: Checkov IaC Scan
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run Checkov
        uses: bridgecrewio/checkov-action@v12
        with:
          directory: terraform/
          framework: terraform
          output_format: cli,sarif
          output_file_path: console,checkov.sarif
          soft_fail: false
          skip_check: CKV_AWS_145

      - name: Upload SARIF
        if: always()
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: checkov.sarif
          category: checkov-iac

  tfsec:
    name: tfsec Scan
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run tfsec
        uses: aquasecurity/tfsec-action@v1.0.3
        with:
          working_directory: terraform/
          sarif_file: tfsec.sarif
          soft_fail: false

      - name: Upload SARIF
        if: always()
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: tfsec.sarif
          category: tfsec
Step 3: Create Custom Checkov Policies
python
# custom_checks/s3_versioning.py
from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
from checkov.common.models.enums import CheckResult, CheckCategories


class S3BucketVersioning(BaseResourceCheck):
    def __init__(self):
        name = "Ensure S3 bucket has versioning enabled"
        id = "CKV_CUSTOM_1"
        supported_resources = ["aws_s3_bucket"]
        categories = [CheckCategories.GENERAL_SECURITY]
        super().__init__(name=name, id=id, categories=categories,
                         supported_resources=supported_resources)

    def scan_resource_conf(self, conf):
        versioning = conf.get("versioning", [{}])
        if isinstance(versioning, list) and len(versioning) > 0:
            if versioning[0].get("enabled", [False])[0]:
                return CheckResult.PASSED
        return CheckResult.FAILED


check = S3BucketVersioning()
Step 4: Configure Baseline and Suppressions
yaml
# .checkov.yaml
branch: main
compact: true
directory:
  - terraform/
  - cloudformation/
framework:
  - terraform
  - cloudformation
  - kubernetes
output:
  - cli
  - sarif
skip-check:
  - CKV_AWS_145    # S3 default encryption with CMK (using SSE-S3 is acceptable)
  - CKV2_AWS_6     # S3 bucket request logging (handled at CloudTrail level)
soft-fail: false
Step 5: Scan Kubernetes Manifests and Helm Charts
bash
# Scan Kubernetes manifests
checkov -d ./k8s/ --framework kubernetes

# Scan Helm charts (renders templates first)
checkov -d ./charts/myapp/ --framework helm

# Scan with KICS (Keeping Infrastructure as Code Secure)
docker run -v $(pwd)/k8s:/path checkmarx/kics:latest scan \
  --path /path \
  --output-path /path/results \
  --type Kubernetes \
  --report-formats json,sarif

Key Concepts

TermDefinition
IaC ScanningAutomated analysis of infrastructure code templates to detect security misconfigurations before deployment
Policy as CodeSecurity policies defined as executable code that can be version-controlled, tested, and enforced automatically
CKV Check IDCheckov's unique identifier for each security check (e.g., CKV_AWS_18 for S3 public access)
Terraform Plan ScanningScanning the resolved Terraform plan JSON which includes computed values and module expansions
Graph-based ScanningCheckov's ability to analyze relationships between resources, not just individual resource configs
Drift DetectionIdentifying differences between IaC definitions and actual deployed infrastructure state
Custom PolicyOrganization-specific security checks authored in Python or YAML to enforce internal standards
Show full SKILL.md (182 more words)Show less

Tools & Systems

  • Checkov: Open-source IaC scanner by Bridgecrew with 2500+ built-in policies covering major cloud providers
  • tfsec: Terraform-focused static analysis tool by Aqua Security with deep HCL understanding
  • KICS: Open-source IaC scanner by Checkmarx supporting 15+ IaC frameworks
  • Terrascan: IaC scanner with OPA Rego policy support for custom policy authoring
  • Snyk IaC: Commercial IaC scanner integrated with the Snyk platform

Common Scenarios

Scenario: Preventing Public S3 Buckets in Terraform

Context: A development team repeatedly creates S3 buckets without proper access controls. A recent incident exposed customer data through a public bucket.

Approach:

  1. Enable Checkov in the CI/CD pipeline for all Terraform changes
  2. Enforce CKV_AWS_18 (no public read ACL), CKV_AWS_19 (encryption), CKV_AWS_20 (no public access block disabled)
  3. Create a custom policy requiring the aws_s3_bucket_public_access_block resource for every S3 bucket
  4. Set soft_fail: false to block PR merges when S3 security checks fail
  5. Provide Terraform modules with security defaults that teams can reuse

Pitfalls: Scanning only .tf files misses dynamically computed values. Use Terraform plan scanning for higher accuracy. Checkov's resource-relationship checks (CKV2 prefix) require graph analysis mode.

Output Format

IaC Security Scan Report
==========================
Framework: Terraform
Directory: terraform/
Scan Date: 2026-02-23

Checkov Results:
  Passed: 187
  Failed: 12
  Skipped: 3
  Unknown: 0

FAILED CHECKS:
  CKV_AWS_18  [HIGH]   S3 Bucket has public read ACL
              Resource: aws_s3_bucket.data_lake
              File:     terraform/storage.tf:15-28

  CKV_AWS_24  [HIGH]   CloudWatch log group not encrypted
              Resource: aws_cloudwatch_log_group.app
              File:     terraform/monitoring.tf:3-8

  CKV_AWS_79  [MEDIUM] Instance metadata service v1 enabled
              Resource: aws_instance.web
              File:     terraform/compute.tf:12-30

QUALITY GATE: FAILED (2 HIGH severity findings)

© mukul975, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts, references, assets) in skills/implementing-infrastructure-as-code-security-scanning of mukul975/Anthropic-Cybersecurity-Skills.

  • SKILL.md
  • LICENSE
  • assets/template.md
  • references/api-reference.md
  • references/standards.md
  • references/workflows.md
  • scripts/agent.py
  • scripts/process.py

Open the folder on GitHubat commit 54a7988

Compare with similar skills

Implementing Infrastructure As Code Security Scanning next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Implementing Infrastructure As Code Security Scanning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Implementing Infrastructure As Code Security Scanning this skillmukul975/Anthropic-Cybersecurity-Skills34k—~2.2kAutomated safety check: PassApache-2.0
Iac Security ReviewOWASP/secure-agent-playbook187—~694Automated safety check: PassCC-BY-4.0
Iac Securityhardw00t/ai-security-arsenal104—~2.4kAutomated safety check: PassNone
Security Analyzeraiskillstore/marketplace430—~1.2kAutomated safety check: NotesNone
Eks Best Practicesaws-samples/appmod-blueprints113—~5kAutomated safety check: PassMIT-0
Audit Infrastructure As Codecyberful/cyberful135—~649Automated safety check: PassAGPL-3.0

Similar skills

  • Iac Security Review

    OWASP/secure-agent-playbook

    Security review of Infrastructure-as-Code (Terraform, Kubernetes, CloudFormation).

    187 GitHub stars~694 tokensUpdated 12 days ago
    DevOps & CloudAuto-check passed
  • Iac Security

    hardw00t/ai-security-arsenal

    Infrastructure-as-Code security scanning router for Terraform, CloudFormation, Kubernetes manifests, Helm, ARM/Bicep.

    104 GitHub stars~2.4k tokensUpdated 5 mo ago
    DevOps & CloudAuto-check passed
  • Security Analyzer

    aiskillstore/marketplace

    Comprehensive security vulnerability analysis for codebases and infrastructure.

    430 GitHub stars~1.2k tokensUpdated today
    SecurityAuto-check: notes
  • Eks Best Practices

    aws-samples/appmod-blueprints

    Official

    Advisory guidance for Amazon EKS architecture and configuration decisions — compute strategy, networking, security, reliability, cost, autoscaling, observability, multi-tenancy, and upgrade planning.

    113 GitHub stars~5k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Audit infrastructure-as-code artifacts for unsafe defaults, policy gaps, privilege exposure, control drift, and deployment-impact evidence.

    135 GitHub stars~649 tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Asdf

    jjmartres/opencode

    A skill your agent uses whenever the user wants to install, configure, or use asdf (asdf-vm), the universal version manager.

    133 GitHub starsUsed in 1 repo~2.1k tokens
    DevOps & CloudAuto-check: notes

More from mukul975/Anthropic-Cybersecurity-Skills

All 637 skills in this repo
  • Campaign Attribution Evidence Analysis

    mukul975/Anthropic-Cybersecurity-Skills

    Weighs infrastructure, TTP, malware code and timing evidence with the Diamond Model and competing hypotheses to reach a confidence-rated attribution.

    34k GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Go Malware Analysis in Ghidra

    mukul975/Anthropic-Cybersecurity-Skills

    Walks through reverse engineering Go-compiled malware in Ghidra: parsing buildinfo and pclntab, recovering stripped function names and extracting dependencies.

    34k GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check passed
  • LNK and Jump List Forensics

    mukul975/Anthropic-Cybersecurity-Skills

    Guides forensic analysis of Windows LNK shortcut files and Jump Lists with LECmd, JLECmd and manual parsing to show file access and program execution.

    34k GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Malware Persistence Analysis with Autoruns

    mukul975/Anthropic-Cybersecurity-Skills

    Hunts Windows malware persistence with Sysinternals Autoruns, covering run keys, services, scheduled tasks and drivers, with baseline comparison.

    34k GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • NTFS MFT Deleted File Recovery

    mukul975/Anthropic-Cybersecurity-Skills

    Guides a Windows forensic examination of the NTFS Master File Table to recover deleted-file evidence, build timelines and spot timestomping.

    34k GitHub stars~2.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Network Covert Channel Analysis

    mukul975/Anthropic-Cybersecurity-Skills

    Detects DNS tunneling, ICMP exfiltration and HTTP-based covert channels in packet captures and DNS logs when hunting for hidden command-and-control traffic.

    34k GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Implementing Infrastructure As Code Security Scanning

What does Implementing Infrastructure As Code Security Scanning do?

Implements automated security scanning for Infrastructure as Code using Checkov, tfsec, and KICS to detect misconfigurations in Terraform, CloudFormation, Kubernetes manifests, and Helm charts, plus…. Implementing Infrastructure As Code Security Scanning is an agent skill from mukul975/Anthropic-Cybersecurity-Skills. Implements automated security scanning for Infrastructure as Code using Checkov, tfsec, and KICS to detect misconfigurations in Terraform, CloudFormation, Kubernetes manifests, and Helm charts, plus policy-based governance and CI/CD integration.

When should I use Implementing Infrastructure As Code Security Scanning?

Implementing Infrastructure As Code Security Scanning fits situations like: validating cloud infrastructure before deployment; blocking insecure changes (public S3 buckets; open security groups) in pull requests.

How do I install Implementing Infrastructure As Code Security Scanning in Claude Code?

Run `npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-infrastructure-as-code-security-scanning -a claude-code`. Or copy the skill folder (skills/implementing-infrastructure-as-code-security-scanning in mukul975/Anthropic-Cybersecurity-Skills) into .claude/skills/implementing-infrastructure-as-code-security-scanning in your project. Claude Code loads it when a task matches its description.

How do I install Implementing Infrastructure As Code Security Scanning in Codex?

Run `npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-infrastructure-as-code-security-scanning -a codex`. Or copy the skill folder (skills/implementing-infrastructure-as-code-security-scanning in mukul975/Anthropic-Cybersecurity-Skills) into .agents/skills/implementing-infrastructure-as-code-security-scanning in your project. Codex loads it when a task matches its description.

Can I use Implementing Infrastructure As Code Security Scanning in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-infrastructure-as-code-security-scanning -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/implementing-infrastructure-as-code-security-scanning, .gemini/skills/implementing-infrastructure-as-code-security-scanning, .github/skills/implementing-infrastructure-as-code-security-scanning and .opencode/skills/implementing-infrastructure-as-code-security-scanning in your project.

What does Implementing Infrastructure As Code Security Scanning need to run?

Going by SKILL.md and its folder, Implementing Infrastructure As Code Security Scanning needs Python for the scripts in its folder and the command-line tools its instructions call (terraform, docker and pip). Our summary lists: Python 3; Docker.

Does Implementing Infrastructure As Code Security Scanning access the network?

SKILL.md contains no URLs. Its commands use docker and pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Implementing Infrastructure As Code Security Scanning safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Implementing Infrastructure As Code Security Scanning use?

Implementing Infrastructure As Code Security Scanning is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Implementing Infrastructure As Code Security Scanning use?

About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.

What are the alternatives to Implementing Infrastructure As Code Security Scanning?

Skills that share tags, products or a category with Implementing Infrastructure As Code Security Scanning: Iac Security Review (OWASP/secure-agent-playbook, 187 stars), Iac Security (hardw00t/ai-security-arsenal, 104 stars), Security Analyzer (aiskillstore/marketplace, 430 stars) and Eks Best Practices (aws-samples/appmod-blueprints, 113 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Implementing Infrastructure As Code Security Scanning?

mukul975 (a GitHub user) maintains it in mukul975/Anthropic-Cybersecurity-Skills, which has 33,922 GitHub stars. The repository holds 637 skills in this directory. The repository was last updated on August 31, 2026.

Source: mukul975/Anthropic-Cybersecurity-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.