Skip to content
iac-security-auditor logo

Skill: IaC Security & Compliance Auditor

iac-security-auditor

Use this skill AFTER a terraform plan has been generated. This skill audits a terraform plan file for security vulnerabilities (using tfsec/checkov) and company compliance policies. It either APPROVES or REJECTS the plan.

SKILL.md

Full skill instructions

Skill: IaC Security & Compliance Auditor

Your role is to act as an automated security scanner and compliance officer. You do not write code; you only review it. Your sole purpose is to ensure no infrastructure change violates security best practices or internal policies.

Instructions

  1. Acknowledge Input: You will be given a terraform plan file or output.

  2. Run Security Scan:

    • Use security scanning tools (e.g., tfsec, checkov) on the provided plan.
    • Capture all findings.
  3. Check Compliance Policies:

    • Check the plan against internal compliance rules.
    • Checks to perform:
      • Verify that all resources have the required tags (e.g., owner, cost-center, environment).
      • Ensure no security groups have inbound rules open to 0.0.0.0/​0 (public internet) on sensitive ports (e.g., 22, 3389, 3306, 5432).
      • Ensure no S3 buckets are being created without "block all public access" enabled.
      • Verify all resources are being deployed in an approved region.
      • Check for encryption at rest on all data stores (RDS, S3, EBS).
      • Verify IAM roles follow principle of least privilege.
  4. Generate Audit Report:

    • List all findings (security and compliance) in a clear, itemized list.
    • For each finding, state its Severity (CRITICAL, HIGH, MEDIUM, LOW) and the Suggested Remediation.
  5. Deliver Final Verdict:

    • Based on the findings, you must make a final decision.
    • If there are any CRITICAL or HIGH severity findings, you MUST reject the plan.
    • If approved: "AUDIT_RESULT: APPROVED. This plan passes all security and compliance checks."
    • If rejected: "AUDIT_RESULT: REJECTED. This plan violates one or more policies. Please address the following issues before re-submitting for review:" (followed by the list of findings).

Security Scanning Tools

tfsec

tfsec --format json /​path/​to/​terraform/​files

checkov

checkov -d /​path/​to/​terraform/​files --output json

Compliance Policy Checks

Required Tags

All resources MUST have:

  • owner: Email of resource owner
  • cost-center: Business unit or department
  • environment: dev/​staging/​production
  • project: Project name
  • managed-by: "terraform"

Security Group Rules

  • No inbound 0.0.0.0/​0 on ports: 22, 3389, 3306, 5432, 5984, 6379, 8020, 9200, 27017
  • HTTPS (443) and HTTP (80) may be open for load balancers only
  • All other services must use VPN or bastion host

S3 Bucket Security

  • Block all public access MUST be enabled
  • Versioning MUST be enabled for production buckets
  • Encryption at rest MUST be enabled
  • Logging MUST be configured

Database Security

  • RDS instances MUST have encryption at rest
  • RDS instances MUST NOT be publicly accessible
  • RDS instances MUST have automated backups enabled
  • Database credentials MUST use AWS Secrets Manager

Network Security

  • Default VPC MUST NOT be used
  • All subnets MUST be in approved VPCs
  • Production resources MUST be in private subnets

Example Audit Report

SECURITY AUDIT REPORT
=====================

Total Findings: 3
CRITICAL: 1
HIGH: 1
MEDIUM: 1
LOW: 0

---

[CRITICAL] aws_s3_bucket.data_lake
Issue: Block Public Access is not enabled
CIS: 2.1.5
Remediation: Add aws_s3_bucket_public_access_block resource

[HIGH] aws_security_group.web_sg
Issue: Ingress rule allows 0.0.0.0/​0 on port 22
CIS: 5.2
Remediation: Restrict SSH access to VPN range (10.0.0.0/​8)

[MEDIUM] aws_instance.web_server
Issue: Missing required tag 'cost-center'
Policy: Tagging Standard v2.1
Remediation: Add cost-center tag with valid department code

---

AUDIT_RESULT: REJECTED

This plan violates 1 CRITICAL and 1 HIGH severity policies.
Please address all findings before re-submitting for review.

More DevOps & CI/CD skills

Project scaffolding, deployment configuration, and CI/CD setup for Google ADK agents.

6K 472.6K
View

Set up tracing, logging, and monitoring for deployed ADK agents across Cloud Trace, BigQuery, and third-party platforms.

6K 472.6K
View

Enterprise Azure infrastructure architect generating Bicep or Terraform from workload descriptions.

1.5K 454.3K
View
azure-kubernetes logo
DevOps & CI/CD

azure-kubernetes

Plan and configure production-ready Azure Kubernetes Service clusters with Day-0 and Day-1 best practices.

1.5K 447.1K
View

Raw mechanical interfaces fusing Swiss typographic print with military terminal aesthetics. Rigid grids, extreme type scale contrast, utilitarian color, analog degradation effects. For data-heavy dashboards, portfolios, or editorial sites that need to feel like declassified blueprints.

92.7K 354.9K
View
just-scrape logo
DevOps & CI/CD

just-scrape

Web search, scraping, extraction, crawling, and monitoring via ScrapeGraph AI CLI.

69 245K
View

Skill for working with Firebase Hosting (Classic). Use this when you want to deploy static web apps, Single Page Apps (SPAs), or simple microservices. Do NOT use for Firebase App Hosting.

462 159.7K
View

Deploy and manage web apps with Firebase App Hosting. Use this skill when deploying Next.js/Angular apps with backends.

462 159.1K
View
deploy-to-vercel logo
DevOps & CI/CD

deploy-to-vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

31.9K 146.6K
View
programmatic-seo logo
DevOps & CI/CD

programmatic-seo

Build SEO-optimized pages at scale using templates, data, and proven playbook patterns.

53.3K 140.1K
View

Design and build isolated, reusable Convex backend components with clear boundaries and app-facing wrappers.

63 123.5K
View

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to vercel", "set up vercel", "add environment variables to vercel".

31.9K 116.1K
View

Coding & apps AI tools

Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View
Imagica logo
Coding & apps

Imagica

Build a no-code AI app in minutes.

Freemium
View
E
Coding & apps

Emergent.sh

An IDE for code migration from legacy to modern frameworks through coding agents.

Freemium
View
Wonder Dynamics logo
Coding & apps

Wonder Dynamics

Automate CGI animation in live-action scenes

Paid
View
M
Coding & apps

Mixo

Launch a website in seconds with AI.

Paid
View
AI Code Convert logo
Coding & apps

AI Code Convert

Streamline Your Coding Experience with AI Code Helper

Free
View