IaC Cost and Security Auditor

    1

    Audit Terraform, CDK, and CloudFormation for security vulnerabilities and cloud cost leaks.

    $1.43

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    IaC Cost and Security Auditor

    Example session with this skill installed

    Audit this terraform code for any security risks or high costs: resource "aws_instance" "app" { ami = "ami-123" instance_type = "m5.4xlarge" } resource "aws_security_group" "web" { ingress { from_port = 22 to_port = 22 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } }

    • Read your context and instructions
    • Compiled the iac cost

    I have audited the provided Terraform configuration for security vulnerabilities and cost inefficiencies.

    IaC Audit — aws_instance and aws_security_group

    Summary

    The configuration contains a critical security risk regarding SSH access and a high-impact cost inefficiency due to an oversized instance type for what appears to be a standard app resource.

    Security — Critical

    • [main.tf:6] Security group web allows SSH (port 22) access from 0.0.0.0/0.
      Risk: This exposes the instance to brute-force attacks from the entire internet.
      Fix: Restrict cidr_blocks to your specific corporate IP range or use AWS Systems Manager Session Manager to eliminate the need for open SSH ports.
      cidr_blocks = ["203.0.113.0/24"] # Example: Replace with your VPC or Office IP
      

    Cost — High impact

    • [main.tf:2] Instance type m5.4xlarge is provisioned.
      Suggestion: This is a large, general-purpose instance (16 vCPUs, 64 GiB RAM) with a high hourly rate. Unless this is a production database or high-traffic application, consider right-sizing to t3.medium or m5.large.
      Fix:
      instance_type = "t3.medium"
      

    Security — Medium

    • [main.tf:1] Missing EBS encryption and detailed monitoring.
      Risk: Data at rest is not encrypted by default on this instance resource, and standard monitoring lacks the granularity needed for rapid incident response.
      Fix: Add root_block_device { encrypted = true } and monitoring = true to the resource block.

    Next steps

    1. Update the security group to restrict SSH access to a known CIDR block.
    2. Confirm the resource requirements for the app instance and downsize if possible.
    3. Enable EBS encryption to meet compliance best practices.

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

    About this skill

    The problem

    Infrastructure-as-code (IaC) generated by AI often prioritizes "it works" over "it is secure and cost-efficient." This leads to open security groups, wildcard IAM policies, and oversized cloud instances that aren't caught until the bill arrives or a breach occurs.

    What it does

    • Scans Terraform, CloudFormation, CDK, and Pulumi files for security red flags like open CIDR ranges, public storage, and unencrypted volumes.
    • Identifies cost-inefficient resource choices such as redundant NAT gateways, Multi-AZ in dev environments, and outdated EBS volume types.
    • Performs deep IAM policy analysis to find privilege escalation risks beyond simple wildcard checks.
    • Classifies findings by severity and impact, providing specific HCL or YAML snippets to fix the identified issues.

    Frameworks & tools

    Terraform, AWS CloudFormation, AWS CDK, Pulumi, Infracost, AWS, Azure, GCP.

    Why this beats prompting it yourself

    Generic prompts often miss architectural cost drivers or subtle IAM bypasses. This skill follows a structured rubric to ensure every review covers both security posture and resource right-sizing without getting distracted by code style or linting.

    Use cases

    • Reviewing a Pull Request that introduces new networking or IAM resources.
    • Auditing a generated Terraform plan before executing an apply command.
    • Hardening an existing deployment that has grown without oversight.
    • Finding immediate cost savings in development or staging environments.

    Known limitations

    Heuristic-based cost checks do not provide exact dollar amounts without external tools like Infracost. It focuses on infrastructure settings rather than application-level security.

    Heuristic cost checks provide relative impact (High/Medium/Low) rather than exact dollar figures unless Infracost is available. Focuses on infra settings, not application-level code vulnerabilities.

    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 any payment.

    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 2 months ago

    Permissions

    Read Files
    Listed2 months ago
    Updated23 days ago

    What's inside

    Frequently Asked Questions

    This skill supports major IaC frameworks including Terraform, AWS CloudFormation, AWS CDK, and Pulumi across AWS, Azure, and GCP environments.

    While it identifies architectural cost-leaks like redundant gateways or oversized instances, it provides structural optimization recommendations rather than exact real-time dollar estimates.

    The auditor performs a deep analysis of IAM policies and security groups to identify complex privilege escalation risks and open CIDR ranges that standard AI prompts often overlook.

    The auditor provides a structured report classifying findings by severity along with specific HCL or YAML code snippets to remediate the identified security or cost issues.

    This skill focuses exclusively on the infrastructure layer; it does not scan application-level source code (like Python or Java) for vulnerabilities or logic flaws.

    New in DevOps & Cloud