Skip to content
Back to skills

Aws Terraform Security Reviewer

ASecurity

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

  • 33 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added September 5, 2026
devopsrustbashawsterraformgitapisecurity

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 5, 2026

npx -y skills add dvcrn/openclaw-skills-marketplace --skill aws-terraform-security-reviewer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Aws Terraform Security Reviewer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Aws Terraform Security Reviewer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dvcrn-aws-terraform-security-reviewer/badge)](https://www.skillsdirectory.com/skills/dvcrn-aws-terraform-security-reviewer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: aws-terraform-security-reviewer
description: "Review Terraform plans and HCL files for AWS security misconfigurations before deployment"
---

# 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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in devops →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.