Hub rules-terraform

rules-terraform

v2 public Verified

Terraform

Terraform is an infrastructure as code tool for building, changing, and versioning infrastructure safely and efficiently. These rules govern security configurations, credential safety, and infrastructure best practices for AI agents.

@sigmashakeinc 2 pulls 14 rules published Apr 8, 2026 synced Oct 11, 2026 sigmashakeinc/rules/rulesets/rules-terraform →
Severity
8 error 6 warn 0 info
demo.cast
Terraform is an infrastructure as code tool for building, changing, and versioning infrastructure safely and efficiently. These rules govern security configurations, credential safety, and infrastructure best practices for AI agents.

Rules index

14 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

terraform

terraform-hardcoded-aws-keys error block

Hardcoding AWS access keys or secret keys in Terraform files is a critical security risk. Use environment variables (AWS_ACCESS_KEY_ID), a credentials file, or an IAM role instead.

Rule source requires an active Pro or Enterprise subscription.
terraform-missing-backend warning log

Storing terraform.tfstate locally can lead to sensitive data exposure and state corruption in team environments. Ensure you are using a secure remote backend (e.g., S3, Azure Blob, Terraform Cloud) for production infrastructure.

Rule source requires an active Pro or Enterprise subscription.
terraform-unpinned-module-source warning log

Using a GitHub module source without pinning to a specific commit or tag (?ref=) can break your infrastructure if the module's main branch introduces breaking changes or is compromised.

Rule source requires an active Pro or Enterprise subscription.

tf

ask-terraform-destroy error ask

terraform destroy will delete all managed infrastructure. This is irreversible for stateful resources (databases, S3 buckets). Verify the workspace and confirm this is intentional.

Rule source requires an active Pro or Enterprise subscription.
no-cloudtrail-disabled error block

CloudTrail logging is disabled. Audit logging is required for compliance and incident response. Set enable_logging = true.

Rule source requires an active Pro or Enterprise subscription.
no-hardcoded-credentials error block

Hardcoded credentials in Terraform files are committed to version control. Use environment variables (AWS_ACCESS_KEY_ID), terraform.tfvars (git-ignored), or a secrets manager.

Rule source requires an active Pro or Enterprise subscription.
no-iam-star-action error block

IAM policy grants all actions ('*'). This violates least-privilege. Enumerate only the specific actions your resource requires (e.g., ["s3:GetObject", "s3:PutObject"]).

Rule source requires an active Pro or Enterprise subscription.
no-iam-star-resource error block

IAM policy applies to all resources ('*'). Scope the policy to specific ARNs to prevent unintended access to other resources in the account.

Rule source requires an active Pro or Enterprise subscription.
no-open-ingress-all-traffic error block

Security group allows all inbound traffic from anywhere (0.0.0.0/0 on port 0). Restrict to specific CIDR ranges and necessary ports only.

Rule source requires an active Pro or Enterprise subscription.
no-public-s3-bucket error block

Terraform is creating a public S3 bucket. All objects will be accessible to the internet. Use presigned URLs or CloudFront for controlled access.

Rule source requires an active Pro or Enterprise subscription.
no-rds-without-deletion-protection warning log

RDS instance without deletion_protection = true. A terraform destroy or accidental apply could permanently delete your database. Set deletion_protection = true for production databases.

Rule source requires an active Pro or Enterprise subscription.
no-s3-versioning-disabled warning log

S3 bucket without versioning. Versioning protects against accidental deletion and overwrites. Add an aws_s3_bucket_versioning resource with status = 'Enabled' for important data.

Rule source requires an active Pro or Enterprise subscription.
no-security-group-all-egress warning log

Security group allows all outbound traffic. For sensitive workloads, restrict egress to only required destinations and ports to limit blast radius of a compromise.

Rule source requires an active Pro or Enterprise subscription.
no-unencrypted-storage warning log

Storage resource without encryption detected. Set storage_encrypted = true (RDS) or encrypted = true (EBS) to enable encryption at rest.

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v2
Published
Apr 8, 2026
Source commits
0
Synced
Oct 11, 2026
Hash
d21bdd066f43b3ed951738b51213b45f745172c376b4b6cd905b1524e129f6e1
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-terraform/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-terraform. The published version only bumps when a maintainer resyncs.

No commit history available.