auditing-terraform-infrastructure-for-security

Featured

Auditing Terraform infrastructure-as-code for security misconfigurations using Checkov, tfsec, Terrascan, and OPA/Rego policies to detect overly permissive IAM policies, public resource exposure, missing encryption, and insecure defaults before cloud deployment.

DevOps & Infrastructure 13,115 stars 1533 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Auditing Terraform Infrastructure for Security ## When to Use - When integrating security scanning into CI/CD pipelines for Terraform deployments - When reviewing Terraform plans and modules for security best practices before applying - When building policy-as-code guardrails for cloud infrastructure provisioning - When auditing existing Terraform state files to identify deployed misconfigurations - When enforcing organizational security standards across multiple Terraform projects **Do not use** for runtime security monitoring (use CSPM tools), for application security testing (use SAST/DAST tools), or for cloud configuration drift detection (use AWS Config or Azure Policy after deployment). ## Prerequisites - Checkov installed (`pip install checkov`) - tfsec installed (`brew install tfsec` or binary from GitHub) - Terrascan installed (`brew install terrascan`) - Terraform v1.0+ for plan generation - OPA (Open Policy Agent) for custom policy enforcement - Git repository with Terraform code to audit ## Workflow ### Step 1: Scan Terraform Code with Checkov Run Checkov for comprehensive IaC security scanning with built-in and custom policies. ```bash # Scan a Terraform directory checkov -d ./terraform/ --framework terraform # Scan with specific check categories checkov -d ./terraform/ --check CKV_AWS_18,CKV_AWS_19,CKV_AWS_20,CKV_AWS_21 # Scan and output results in JSON checkov -d ./terraform/ --output json > checkov-results.json # Scan a Terraform plan file for mo...

Details

Author
mukul975
Repository
mukul975/Anthropic-Cybersecurity-Skills
Created
3 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

DevOps & Infrastructure Featured

implementing-infrastructure-as-code-security-scanning

This skill covers implementing automated security scanning for Infrastructure as Code (IaC) templates using tools like Checkov, tfsec, and KICS. It addresses detecting misconfigurations in Terraform, CloudFormation, Kubernetes manifests, and Helm charts before deployment, establishing policy-based governance, and integrating IaC scanning into CI/CD pipelines to prevent insecure cloud resource provisioning.

13,115 Updated today
mukul975
DevOps & Infrastructure Solid

iac-checkov

Infrastructure as Code (IaC) security scanning using Checkov with 750+ built-in policies for Terraform, CloudFormation, Kubernetes, Dockerfile, and ARM templates. Use when: (1) Scanning IaC files for security misconfigurations and compliance violations, (2) Validating cloud infrastructure against CIS, PCI-DSS, HIPAA, and SOC2 benchmarks, (3) Detecting secrets and hardcoded credentials in IaC, (4) Implementing policy-as-code in CI/CD pipelines, (5) Generating compliance reports with remediation guidance for cloud security posture management.

335 Updated today
aiskillstore
DevOps & Infrastructure Listed

iac-container-security

Audit infrastructure-as-code and container security including Terraform/OpenTofu/Pulumi configurations, Dockerfile hardening, Kubernetes manifests, base image hygiene, container scanning, secrets in IaC, IAM policies, network exposure, and runtime security context. Multi-cloud (AWS, GCP, Azure). Use this skill whenever the user asks about Terraform security, tfsec, Checkov, Trivy, Dockerfile hardening, distroless images, k8s securityContext, network policies, IAM least privilege, IaC secret scanning, or 'audit my infrastructure'. Trigger on phrases like 'scan my Dockerfile', 'review my Terraform', 'audit my k8s manifests', 'harden my containers', 'IaC security', 'base image hygiene', 'container CVEs', 'trivy scan'. Use this even when only one IaC layer is mentioned.

1 Updated 1 weeks ago
hlsitechio
AI & Automation Listed

iac-terraform-audit

Audit Terraform, OpenTofu, Terragrunt, and Pulumi modules for state, provider pinning, security (Checkov/tfsec), module hygiene, environment separation, drift, and cost. One sub-agent per module. Static, live, and apply modes.

3 Updated today
anthril
DevOps & Infrastructure Solid

iac-security-scanner

Infrastructure as Code security scanning and policy enforcement for Terraform, CloudFormation, Kubernetes, and Pulumi

1,160 Updated today
a5c-ai