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.
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-leakRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/BitterSecurity/Decepticon /tmp/Decepticon && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/Decepticon/packages/decepticon/decepticon/skills/standard/cloud/terraform-state-leak ~/.gemini/antigravity-cli/skills/terraform-state-leakAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install terraform-state-leak in Antigravity CLI
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
ANo 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 →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
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.
