Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Terraform IaC Security Audit

    by CashonlyTian

    1

    Audit Terraform files for cloud misconfigurations, open ports, and secrets with a 0-100 score and fix report.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Terraform IaC Security Audit

    Terraform IaC Security Audit

    Example session with this skill installed

    Run a security audit on the terraform files in the ./infra/production directory for Project "Titan". Use the brand "Titan-Ops" for the report.

    • Read your context and instructions
    • Compiled the terraform iac security
    • Generated the document

    I have completed the security audit for the Terraform files in the ./infra/production directory. The scan identified several critical misconfigurations that should be addressed before deployment.

    Audit Summary

    • Project: Titan
    • Score: 42/100
    • Grade: D
    • Risk Level: HIGH
    • Total Findings: 14 (4 critical, 5 high, 5 medium)

    Security Scan Results

    Check CategoryScoreStatus
    Public Storage0/15CRITICAL: Public S3 ACLs and Databases found
    Open Security Groups5/15HIGH: SSH/RDP open to 0.0.0.0/0
    Encryption at Rest7/10MEDIUM: Unencrypted EBS volumes
    Secrets in TF15/15PASS: No hardcoded secrets detected
    IAM Wildcards0/10HIGH: Action "*" found in 2 policies
    Logging & Monitoring5/10MEDIUM: VPC Flow Logs missing
    Version Pinning5/5PASS: All modules and providers pinned
    State Security0/10CRITICAL: .tfstate file found in repo
    Backup & Retention2/5MEDIUM: RDS backup retention set to 0
    Metadata Hardening3/5LOW: IMDSv2 not enforced on 2 instances

    Top 3 Prioritized Fixes:
    1.

    Remove State Files: Delete terraform.tfstate from the repository and migrate to a secure remote backend with encryption and locking.
    2.

    Close Public Storage: Update S3 bucket ACLs to private and set publicly_accessible = false on the RDS instance in db.tf.
    3. Restrict IAM Policies: Replace Action = ["*"] with specific service actions in the app-runner-role policy.

    Generated Files:

    • Scorecard Image: scan-2025-05-20.png
    • Detailed Report: scan-report.md

    Next steps

    • Delete the committed .tfstate file immediately to prevent state exposure.
    • Apply the S3 and RDS access blocks to remediate the public exposure findings.
    • Re-run the scan after applying fixes to verify the new security grade.

    scan-2025-05-20.png

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Deploying cloud infrastructure without a pre-flight security check is a liability. This skill audits your local Terraform files to catch misconfigurations, open ports, and hardcoded secrets before you run a single deployment command.

    What it does

    • Scans for public exposure by identifying open S3 buckets, public database flags, and 0.0.0.0/0 ingress rules on sensitive ports.
    • Audits encryption and backups to ensure server-side encryption is active, database backups are enabled, and deletion protection is configured.
    • Identifies IAM risks including wildcard actions, principal stars, and unhardened EC2 instance metadata (IMDSv1).
    • Detects secrets by scanning .tf and .tfvars files for hardcoded passwords, keys, or tokens.
    • Evaluates state security by checking for committed .tfstate files and ensuring remote backends use encryption and locking.
    • Scores infrastructure across 10 specific categories to provide a 0-100 grade, risk level, and prioritized fix report.

    How it works

    1. Provide the local path to the repository containing your Terraform files.
    2. The agent runs a local Python script to analyze your configuration without uploading data or making network calls.
    3. Review the generated PNG scorecard for a high-level grade and the Markdown report for specific line-by-line findings.
    4. Apply the suggested fixes in priority order, starting with the highest point-loss items.

    Frameworks & tools

    The skill analyzes HCL (HashiCorp Configuration Language) within *.tf and *.tfvars files. It utilizes a local Python-based scanner to generate reports and PNG visual scorecards.

    Why this beats prompting it yourself

    Generic prompts often miss specific configuration nuances like IMDSv2 requirements or provider version pinning. This skill uses a structured 10-point scoring system and local script execution to provide consistent, repeatable audits that can be integrated into your development flow.

    Use cases

    • Reviewing pull requests to ensure new infrastructure changes don't introduce security regressions.
    • Auditing inherited codebases to establish a security baseline and risk profile.
    • Generating shareable security scorecards for client reporting or internal compliance reviews.
    • Pre-deployment scanning to prevent the creation of publicly accessible cloud resources.

    Known limitations

    Does not perform live cloud environment probes or base image CVE scanning. Complex HCL logic like dynamic blocks or deeply nested jsonencode expressions may be missed. Scans are limited to files under 2 MB.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Scans local files only, no live cloud probes. Does not scan binary files or files >2MB. Complex HCL like dynamic blocks or deep jsonencode may be missed.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 5 days ago

    Software
    Python 3Pillow

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed5 days ago

    What's inside

    Frequently Asked Questions

    The skill analyzes HCL (HashiCorp Configuration Language) files, specifically targeting AWS, Azure, and GCP resources. It covers critical security areas like IAM policies, storage encryption, networking rules, and hardcoded secrets.

    No, the analysis is performed locally using a Python-based scanner. Your Terraform files and infrastructure configurations are processed on your machine and are never uploaded to a third-party server or external cloud environment.

    You will receive the core AI agent skill, the local Python scanning script, and documentation on how to interpret the 0-100 scoring system. The package also includes the Markdown report template and the PNG scorecard generator.

    While generic prompts might miss subtle configuration flaws, this skill uses a structured 10-point scoring framework for repeatable results. It provides a visual PNG scorecard and a prioritized fix report, making it easier to track security improvements over time.

    The skill is designed to work with AI agents that support local file system access and Python execution. It is compatible with most modern agentic frameworks that allow for custom tool integration and local script calling.

    The skill identifies static configuration errors, such as an S3 bucket set to 'public.' It does not perform 'live' runtime tests, such as penetration testing an active endpoint or scanning container images for OS-level vulnerabilities.

    New in LLM Ops