# terraform-security-audit

Reviews Terraform files for security issues across six areas and returns a pass-or-fail report. Run it before a deployment or when reviewing a new service.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 109
- Author: c0x12c
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/c0x12c/ai-toolkit/tree/HEAD/toolkit/skills/terraform-security-audit/SKILL.md
- Updated: 2026-06-18
- HTML: https://affpapa.org/en/nevibecode/skills/terraform-security-audit

## What it does

The skill examines `.tf` files for risks involving IAM, network rules, encryption, secrets, cluster access, and compliance. Its report gives each area a status and puts severe findings, such as a publicly reachable database, first. It also suggests code changes for checks that fail.

It uses file reading and search tools to inspect the project. The skill reports findings rather than editing Terraform itself. It covers every audit area, including AWS settings, resource tags, backups, and logging.

## Requirements
- Works with: Terraform

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add c0x12c/ai-toolkit --skill terraform-security-audit -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/terraform-security-audit/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/terraform-security-audit/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add c0x12c/ai-toolkit --skill terraform-security-audit -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/terraform-security-audit/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add c0x12c/ai-toolkit --skill terraform-security-audit -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/terraform-security-audit/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install c0x12c/ai-toolkit terraform-security-audit
```

2. **Manually: put the files in place**
- File: `.github/skills/terraform-security-audit/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add c0x12c/ai-toolkit --skill terraform-security-audit -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/c0x12c/ai-toolkit --path toolkit/skills/terraform-security-audit
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/terraform-security-audit/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add c0x12c/ai-toolkit --skill terraform-security-audit -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/c0x12c/ai-toolkit/tree/HEAD/toolkit/skills/terraform-security-audit/SKILL.md

## When to use it
- spot IAM policies with overly broad permissions
- find databases exposed to public traffic
- check encryption settings for storage and connections
- catch secrets embedded in Terraform files
- review resource tags and backup settings

## Example prompts
- Audit this Terraform project and list the critical security findings first.
- Review the infrastructure before deployment and suggest code fixes for failed checks.
- Inspect all `.tf` files and write a report for each security area.

## Similar
- [git-guardrails-claude-code](https://affpapa.org/en/nevibecode/skills/git-guardrails-claude-code.md) — skill · 499069 installs
- [ponytail-review](https://affpapa.org/en/nevibecode/skills/ponytail-review.md) — skill · 57000 installs
- [ponytail-audit](https://affpapa.org/en/nevibecode/skills/ponytail-audit.md) — skill · 45400 installs
- [security-audit](https://affpapa.org/en/nevibecode/skills/cloudflare-security-audit.md) — skill · 54800 installs
- [security-and-hardening](https://affpapa.org/en/nevibecode/skills/security-and-hardening.md) — skill · 70200 installs
- [supabase](https://affpapa.org/en/nevibecode/skills/supabase.md) — skill · 8 installs

From the same set: [c0x12c/ai-toolkit](https://affpapa.org/en/nevibecode/by/c0x12c/ai-toolkit.md) — 33 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
