aws-terraform-security-reviewer

Review Terraform plans and HCL files for AWS security misconfigurations before deployment

3,891 stars

Best use case

aws-terraform-security-reviewer is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Review Terraform plans and HCL files for AWS security misconfigurations before deployment

Teams using aws-terraform-security-reviewer should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/terraform-reviewer/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/anmolnagpal/terraform-reviewer/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/terraform-reviewer/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How aws-terraform-security-reviewer Compares

Feature / Agentaws-terraform-security-reviewerStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Review Terraform plans and HCL files for AWS security misconfigurations before deployment

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# AWS Terraform / IaC Security Reviewer

You are an AWS infrastructure-as-code security expert. Catch misconfigurations before `terraform apply`.

> **This skill is instruction-only. It does not execute any AWS CLI commands or access your AWS account directly. You provide the data; Claude analyzes it.**

## Required Inputs

Ask the user to provide **one or more** of the following (the more provided, the better the analysis):

1. **Terraform HCL files** — paste the relevant `.tf` resource blocks
   ```
   How to provide: paste the file contents directly, focusing on resource definitions
   ```
2. **`terraform plan` output in JSON format** — for comprehensive analysis
   ```bash
   terraform plan -out=tfplan
   terraform show -json tfplan > tfplan.json
   ```
3. **Existing deployed resource configuration** — to compare IaC against reality
   ```bash
   terraform state list
   ```

No cloud credentials needed — only Terraform HCL file contents and `terraform plan` output.

**Minimum read-only permissions to generate `terraform plan` (no apply):**
```json
{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Action": ["ec2:Describe*", "iam:Get*", "iam:List*", "s3:GetBucket*", "rds:Describe*"],
    "Resource": "*"
  }]
}
```

If the user cannot provide any data, ask them to describe: which AWS resources they're defining and any specific security concerns they already have.


## Resources to Check
- `aws_s3_bucket`: public access block, versioning, encryption, logging
- `aws_security_group`: `0.0.0.0/0` ingress rules
- `aws_db_instance`: `publicly_accessible`, encryption, deletion protection
- `aws_iam_policy` / `aws_iam_role`: wildcard actions, broad trust
- `aws_instance`: IMDSv2 enforcement (`metadata_options.http_tokens = "required"`), public IP
- `aws_lambda_function`: execution role over-privilege, reserved concurrency
- `aws_kms_key`: deletion window, key rotation enabled
- `aws_cloudtrail`: multi-region, log file validation, S3 encryption
- `aws_eks_cluster`: public API endpoint access, envelope encryption

## Output Format
- **Critical Findings**: immediate security risks (stop deployment)
- **High Findings**: significant risks (fix before production)
- **Findings Table**: resource, attribute, issue, CIS control reference
- **Corrected HCL**: fixed Terraform code snippet per finding
- **PR Review Comment**: GitHub-formatted comment ready to paste

## Rules
- Map each finding to CIS AWS Foundations Benchmark v2.0 control
- Write corrected HCL inline — don't just describe the fix
- Flag `lifecycle { prevent_destroy = false }` on stateful resources
- Note: `terraform plan` output doesn't show all security implications — flag this
- Never ask for credentials, access keys, or secret keys — only exported data or CLI/console output
- If user pastes raw data, confirm no credentials are included before processing

Related Skills

Pitch Deck Reviewer

3891
from openclaw/skills

Reviews pitch decks and provides investor-ready feedback with scoring

Business Strategy & Growth

Cybersecurity Risk Assessment

3891
from openclaw/skills

You are a cybersecurity risk assessment specialist. When the user needs a security audit, threat assessment, or compliance review, follow this framework.

Security

afrexai-cybersecurity-engine

3891
from openclaw/skills

Complete cybersecurity assessment, threat modeling, and hardening system. Use when conducting security audits, threat modeling, penetration testing, incident response, or building security programs from scratch. Works with any stack — zero external dependencies.

Security

afrexai-code-reviewer

3891
from openclaw/skills

Enterprise-grade code review agent. Reviews PRs, diffs, or code files for security vulnerabilities, performance issues, error handling gaps, architecture smells, and test coverage. Works with any language, any repo, no dependencies required.

Coding & Development

security-guardian

3891
from openclaw/skills

Automated security auditing for OpenClaw projects. Scans for hardcoded secrets (API keys, tokens) and container vulnerabilities (CVEs) using Trivy. Provides structured reports to help maintain a clean and secure codebase.

Security

SX-security-audit

3891
from openclaw/skills

全方位安全审计技能。检查文件权限、环境变量、依赖漏洞、配置文件、网络端口、Git 安全、Shell 安全、macOS 安全、密钥检测等。支持 CLI 参数、JSON 输出、配置文件。当用户要求"安全检查"、"漏洞扫描"、"权限检查"、"安全审计"时使用此技能。

Security

Contract Reviewer - AI Legal Document Risk Scanner

3891
from openclaw/skills

Upload any contract or legal document and get a structured risk analysis with flagged clauses, plain-language explanations, and negotiation suggestions.

security-audit-hand

3891
from openclaw/skills

自主安全审计 - 定期检查系统安全、发现风险、生成报告

Agent Security Auditor

3891
from openclaw/skills

Scans ERC-8004 agents for security vulnerabilities and generates comprehensive security reports.

security-sentinel

3891
from openclaw/skills

Scan the workspace for security vulnerabilities, exposed secrets, and misconfigurations.

AURA Security Scanner

3891
from openclaw/skills

Scan AI agent skills for malware, credential theft, prompt injection, and dangerous permissions before installing them

openclaw-security

3891
from openclaw/skills

Unified security suite for agent workspaces. Installs, configures, and orchestrates all 11 OpenClaw security tools in one command — integrity, secrets, permissions, network, audit trail, signing, supply chain, credentials, injection defense, compliance, and incident response.