- Home
- Skills
- DevOps & Cloud
- Terraform Safety Check
More screenshots
Works with the AI Agents you already use
Terraform Safety Check
Check Terraform before plan or apply: hardcoded secrets, SSH or database ports open to 0.0.0.0/0, public buckets, state files in git, public databases, wildcard IAM policies and unpinned modules.
$5
Terraform Safety Check
Example session with this skill installed
Check this project with terraform-safety-check.
- Read your context and instructions
- Compiled the terraform safety check
$ python3 scripts/check_terraform.py examples/risky
BLOCK main.tf:4 T01 HARDCODED_SECRET
secret_key=<redacted, 21 chars>
Why: A password, key or token is written as a literal string in Terraform code or a .tfvars file. It is readable by anyone with the repository and stays in git history.
Safer: Rotate it, then pass it with a sensitive variable set from the environment (TF_VAR_...), a secrets manager data source, or random_password.
BLOCK main.tf:9 T02 ADMIN_OR_DB_PORT_OPEN_TO_INTERNET
BLOCK main.tf:19 T03 PUBLIC_BUCKET
BLOCK main.tf:34 T01 HARDCODED_SECRET
BLOCK terraform.tfstate T04 STATE_FILE_NOT_IGNORED
REVIEW main.tf:24 T13 S3_PUBLIC_ACCESS_BLOCK_OFF
REVIEW main.tf:30 T11 PUBLIC_DATABASE
REVIEW main.tf:31 T12 ENCRYPTION_DISABLED
REVIEW main.tf:32 T16 DATABASE_DELETION_UNPROTECTED
REVIEW main.tf:39 T14 WILDCARD_IAM_POLICY
REVIEW main.tf:50 T15 MODULE_NOT_PINNED
REVIEW main.tf:55 T17 HTTP_LISTENER_NOT_REDIRECTED
(Each finding also has Why and Safer lines, as in the first one.)
Verdict: BLOCK. Checked 2 files, 2 with Terraform content.
This is a static check of file text. NOT FLAGGED is not a guarantee.
Connects securely to your tools. The creator never sees your data.
About this skill
One security group rule with cidr_blocks = ["0.0.0.0/0"] on port 22 puts a server in front of every bot on the internet. This skill finds that and ten other risky Terraform settings, and tells you how to fix each one.
Your agent runs a scanner on your .tf and .tfvars files and looks for state files that git would commit, using git's real .gitignore rules. It covers common AWS resources plus GCP and Azure firewall rules, and catches passwords inside maps and URLs such as git module sources. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secret values are never printed.
What it checks
BLOCK
- T01: a password, key or token written as a literal string
- T02: SSH, RDP, database or admin ports open to the internet
- T03: a public bucket (public-read ACL or allUsers)
- T04: a state file that .gitignore does not ignore
REVIEW
- T11: publicly_accessible = true
- T12: encryption at rest turned off
- T13: an S3 public access block setting set to false
- T14: an IAM policy with Action * on Resource *
- T15: a module not pinned to a version or tag
- T16: a database with no deletion protection or final snapshot
- T17: an HTTP load balancer listener that does not redirect to HTTPS
What's included
- The scanner (Python 3.9+, standard library only)
- A rules guide with the reason and safer approach for each rule
- A risky and a safe example, and the real report the scanner produces on the risky one
Limits It reads HCL text and does not evaluate variables, count, for_each or module inputs, read .tf.json files, or see remote state. NOT FLAGGED is not a guarantee.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.
Static check of HCL text. Variables, count, for_each and module inputs are not evaluated; .tf.json and remote state are not read. NOT FLAGGED is not a guarantee.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 5 days ago
- Software
python3 (3.9 or newer)
Permissions
Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls. The example files include clearly fake, inert secrets (not-a-real-secret-key, not-a-real-password) for the scanner to find.