Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

terraform-state-leak

Skill by BitterSecurity

Explains how to find, parse and validate exposed Terraform state files, which can contain cloud keys and database passwords. Aimed at security testers, and includes defender remediation steps.

  • Score 85
  • 7k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install terraform-state-leak

Built from the published package, never by AI.

git clone --depth 1 https://github.com/BitterSecurity/Decepticon /tmp/Decepticon && mkdir -p ~/.claude/skills && cp -r /tmp/Decepticon/packages/decepticon/decepticon/skills/standard/cloud/terraform-state-leak ~/.claude/skills/terraform-state-leak

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install terraform-state-leak in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The terraform-state-leak skill is a playbook for exploiting exposed Terraform state files (terraform.tfstate). It explains that these plain JSON files can hold IAM access keys, database passwords, API tokens, TLS private keys and resource topology. It covers finding exposed files on web servers, S3 buckets and in Git history, then parsing them with jq.

It also covers validating IAM keys with the AWS CLI, pivoting to RDS databases, rating severity with CVSS, and logging findings to a knowledge graph. The skill ends with defender remediation steps, such as an encrypted S3 backend, blocking public bucket access and removing committed state from Git history. It is written for security testers working on cloud engagements.

Written from the project's SKILL.md and checked against it.

What it can do

  • Discover exposed state filesChecks web paths, S3 buckets and Git history for terraform.tfstate files.
  • Parse state for secretsUses jq queries to extract IAM keys, RDS passwords and connection URLs from state.
  • Map topologyLists VPC, subnet, security group, ARN and DNS details revealed by the state file.
  • Validate IAM keysUses AWS CLI calls such as sts get-caller-identity to check whether a key is live.
  • RDS pivotDescribes connecting to a database endpoint found in the state file.
  • Defender remediationLists steps such as an encrypted S3 backend, public access blocks and history cleanup.

What you need

  • AWS CLI
  • jq
  • feroxbuster
  • GitHub CLI (gh)

Try asking

  • Check a repo's git history for committed terraform.tfstate files
  • Parse this tfstate file and list the IAM access key resources
  • Give remediation steps for a public Terraform state bucket

Good to know

  • Reading public storage leaves logs at the storage layer, such as S3 access logs.
  • Using IAM keys triggers CloudTrail events.
  • RDS connections require network reach to the database.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: packages/decepticon/decepticon/skills/standard/cloud/terraform-state-leak/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md7 KB

Alternatives to terraform-state-leak

All alternatives →

Compare with function_health, windows-privilege-escalation or github-actions-advanced

terraform-state-leak: common questions

What is a Terraform state file?

The source describes terraform.tfstate as a plaintext JSON map of every resource Terraform manages, including any secrets stored in it.

Does this skill include defense steps?

Yes. The source has a defender remediation section covering encrypted S3 state storage, public access blocks and removing state files from Git history.

Which cloud provider does it cover?

The commands in the source are AWS-specific, including S3, IAM, STS and RDS.

How do I install terraform-state-leak?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is terraform-state-leak free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is terraform-state-leak safe to use?

It scores 85 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to terraform-state-leak?

Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.

terraform-state-leak Install

Add to stack

Loading.