- Home
- Skills
- DevOps & Cloud
- IaC Cost and Security Auditor
IaC Cost and Security Auditor
Audit Terraform, CDK, and CloudFormation for security vulnerabilities and cloud cost leaks.
$5
Works with the AI tools you already use
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
- Generated the document
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
weballows SSH (port 22) access from0.0.0.0/0.
Risk: This exposes the instance to brute-force attacks from the entire internet.
Fix: Restrictcidr_blocksto 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.4xlargeis 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 tot3.mediumorm5.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: Addroot_block_device { encrypted = true }andmonitoring = trueto the resource block.
Next steps
- Update the security group to restrict SSH access to a known CIDR block.
- Confirm the resource requirements for the app instance and downsize if possible.
- Enable EBS encryption to meet compliance best practices.
iac-cost-and-security-auditor.pdf
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
What you get
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.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 16 days ago
- Passed all security checks, Safe to install