Works with the AI Agents you already use
Terraform Security Scan (AWS, Azure, GCP)
by Saizul Amin
This skill gives your agent a proven procedure plus scripts that check the facts, so you get the same correct answer every time, with exact fixes instead of vague advice.
$12
Terraform Security Scan (AWS, Azure, GCP)
Example session with this skill installed
Run the Terraform Security Scan skill on my project and give me a prioritised list of what to fix, with exact changes.
- Read your context and instructions
- Compiled the terraform security scan
Here is what the Terraform Security Scan (AWS, Azure, GCP) skill produced.
Demo: real, unedited output of the skill's bundled script on a sample input from its test suite.
Output
CRITICAL SEC001 -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/terraform-iac-skills/tests/fixtures/tf/insecure/iam.tf:3 provider.aws: access_key is a literal string (value hidden)
fix: rotate it, then pass it via a sensitive variable, a secrets manager data source, or a write-only argument; never commit it
CRITICAL SEC001 -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/terraform-iac-skills/tests/fixtures/tf/insecure/iam.tf:4 provider.aws: secret_key is a literal string (value hidden)
fix: rotate it, then pass it via a sensitive variable, a secrets manager data source, or a write-only argument; never commit it
CRITICAL IAM001 -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/terraform-iac-skills/tests/fixtures/tf/insecure/iam.tf:12 aws_iam_policy.admin: Allow statement with Action "*"
fix: grant only the actions the role needs
CRITICAL IAM003 -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/terraform-iac-skills/tests/fixtures/tf/insecure/iam.tf:47 data.aws_iam_policy_document.wide: statement allows principal * without a condition
fix: name the principals (account, role ARN) or add conditions
CRITICAL IAM003 -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/terraform-iac-skills/tests/fixtures/tf/insecure/iam.tf:56 aws_iam_role.app: trust policy lets any AWS principal assume the role
fix: restrict Principal to specific accounts/roles or an OIDC provider with conditions
CRITICAL SG001 -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/terraform-iac-skills/tests/fixtures/tf/insecure/network.tf:11 aws_security_group.bastion: ingress: 22 (SSH) open to the internet
fix: restrict the CIDR to known ranges, use a load balancer, SSM Session Manager or a VPN for admin access
CRITICAL SG003 -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/terraform-iac-skills/tests/fixtures/tf/insecure/network.tf:34 aws_security_group_rule.all_in: rule: all protocols and ports open to the internet
fix: restrict the CIDR to known ranges, use a load balancer, SSM Session Manager or a VPN for admin access
CRITICAL SG002 -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/terraform-iac-skills/tests/fixtures/tf/insecure/network.tf:43 aws_vpc_security_group_ingress_rule.postgres: rule: 5432 (PostgreSQL) open to the internet
fix: restrict the CIDR to known ranges, use a load balancer, SSM Session Manager or a VPN for admin access
CRITICAL SG001 -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/terraform-iac-skills/tests/fixtures/tf/insecure/network.tf:73 google_compute_firewall.ssh: allow: 22 (SSH) open to the internet
fix: restrict the CIDR to known ranges, use a load balancer, SSM Session Manager or a VPN for admin access
CRITICAL SG001 -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/terraform-iac-skills/tests/fixtures/tf/insecure/network.tf:84 azurerm_network_security_group.web: security rule: 3389 (RDP) open to the internet
fix: restrict the CIDR to known ranges, use a load balancer, SSM Session Manager or a VPN for admin access
CRITICAL S3001 -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/terraform-iac-skills/tests/fixtures/tf/insecure/storage.tf:1 aws_s3_bucket.public: acl = public-read
fix: remove the public ACL, set object_ownership = BucketOwnerEnforced and use a public access block
CRITICAL GCS001 -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/terraform-iac-skills/tests/fixtures/tf/insecure/storage.tf:68 google_storage_bucket_iam_member.public: bucket is readable by allUsers/allAuthenticatedUsers
fix: remove public members; serve public content through a CDN with signed URLs if needed
CRITICAL DB002 -Users-SaizulAmin-Saizul-Old-PC-Saizul-com/bc16f08c-2133-4c9b-92e4-fd071b48ec64/scratchpad/src/terraform-iac-skills/tests/fixtures/tf/insecure/storage.tf:81 google_sql_database_instance.db: authorized_networks contains 0.0.0.0/0
fix: use private IP or the Cloud SQL Auth Proxy; list only known
What you do next
- Fix the highest-severity items first.
- Ask your agent to apply the fixes it suggests, then run the skill again to confirm.
- Keep the skill installed and re-run it whenever the project changes.
Connects securely to your tools. The creator never sees your data.
About this skill
Security review of Terraform/OpenTofu HCL with an offline, dependency-free scanner (no terraform init, no provider downloads) - security groups, NSGs and firewalls open to 0.0.0.0/0 on SSH/RDP/database ports or all ports, public S3/GCS buckets and ACLs, disabled S3 public access blocks, bucket policies with Principal "*", unencrypted RDS/EBS/EFS, publicly accessible databases, wildcard IAM actions and trust policies, long-lived IAM access keys, IMDSv1, hard-coded passwords and provider keys (values never printed), KMS rotation, public EKS endpoints and weak Azure storage settings, with SARIF for GitHub code scanning and inline suppressions.
Who it's for
Use when the user asks to security-review, audit or harden Terraform code, before merging infrastructure changes, when asking "is this security group / bucket / IAM policy safe?", or wants a lightweight IaC security gate in CI next to or instead of Checkov, Trivy, tfsec or KICS.
What's inside
- Tested, offline Python script(s): hcl_security_scan.py (deterministic results, standard library only unless noted)
- Reference guides: fixes.md, rules.md
- Step-by-step agent instructions in SKILL.md covering: When to use; When not to use; Workflow
Why it's worth it
Generic prompts guess. This skill gives your agent a proven procedure plus scripts that check the facts, so you get the same correct answer every time, with exact fixes instead of vague advice. See the real demo below.
Works with every major AI agent
Built on the open SKILL.md standard: Claude Code, Codex CLI, Cursor, VS Code Copilot, Gemini CLI, Windsurf and 20+ other agents.
Requirements
- Python 3.8+ for the bundled scripts
- No API keys, no account, runs locally
Open source: saizul/terraform-iac-skills on GitHub (MIT licence, by Saizul Amin).
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.
How to use
- 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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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 1 day ago
- Software
Python 3.8+