Hub rules-aws

rules-aws

v3 public Verified

AWS

Amazon Web Services (AWS) is a comprehensive, evolving cloud computing platform. These rules govern IAM policies, resource provisioning, and security best practices for AI-assisted AWS infrastructure management.

@sigmashakeinc 3 pulls 22 rules published Apr 8, 2026 synced Oct 11, 2026 sigmashakeinc/rules/rulesets/rules-aws →
Severity
14 error 7 warn 1 info
demo.cast
Amazon Web Services (AWS) is a comprehensive, evolving cloud computing platform. These rules govern IAM policies, resource provisioning, and security best practices for AI-assisted AWS infrastructure management.

Rules index

22 governance rules

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

aws

ask-aws-delete warning ask

AWS resource deletion is irreversible. Verify the target resource and AWS_PROFILE/region before proceeding.

Rule source requires an active Pro or Enterprise subscription.
ask-aws-kms-delete-key error ask

RISK: Scheduling a KMS key for deletion (or disabling it) permanently destroys every ciphertext encrypted under it — RDS snapshots, S3 objects, EBS volumes become unrecoverable. FIX: Confirm no active resources reference the key (use aws kms list-grants, check CloudTrail) and prefer disabling with a long pending-window before deletion.

Rule source requires an active Pro or Enterprise subscription.
ask-iam-create-access-key warning ask

RISK: Long-lived IAM user access keys are the #1 source of AWS credential leaks (GitGuardian 2025). FIX: Prefer IAM Identity Center (SSO), IAM Roles for Service Accounts (IRSA), or role assumption with STS short-lived credentials instead of static user keys.

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

RISK: Disabling CloudTrail logging blinds incident response and breaks compliance requirements (CIS, PCI, HIPAA). FIX: Keep enable_logging = true and set is_multi_region_trail = true with log file validation enabled.

Rule source requires an active Pro or Enterprise subscription.
aws-hardcoded-access-key error block

RISK: Hardcoded AWS access key ID detected — leaked keys are weaponized within minutes (GitGuardian 2025 found 23M+ exposed secrets, 70% still active after 2 years). FIX: Remove the key, rotate it immediately, and load credentials via IAM roles, AWS SSO, or environment variables (never commit them).

Rule source requires an active Pro or Enterprise subscription.
aws-hardcoded-secret-key error block

RISK: Hardcoded AWS secret access key literal detected. FIX: Delete the secret, rotate the IAM credential, and retrieve secrets at runtime from AWS Secrets Manager, Parameter Store, or an IAM role.

Rule source requires an active Pro or Enterprise subscription.
aws-iam-notaction-allow error block

RISK: NotAction combined with Effect=Allow grants every AWS action not explicitly excluded — the same privilege-escalation pattern implicated in the Capital One breach. FIX: Use Effect=Allow with an explicit Action list, or reserve NotAction for Effect=Deny statements only.

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

Using '*' for IAM actions grants administrative privileges. Follow the Principle of Least Privilege by explicitly defining necessary actions.

Rule source requires an active Pro or Enterprise subscription.
aws-imds-hop-limit warning log

RISK: IMDS hop limit >1 lets containerized workloads reach the instance metadata service and steal the EC2 role credentials (common SSRF pivot). FIX: Set http_put_response_hop_limit = 1 unless you explicitly need nested container access.

Rule source requires an active Pro or Enterprise subscription.
aws-imds-v1 warning log

Using IMDSv1 (http_tokens = optional) makes instances vulnerable to SSRF attacks which can leak IAM credentials. Require IMDSv2 by setting http_tokens = 'required'.

Rule source requires an active Pro or Enterprise subscription.
aws-lambda-env-plaintext-secret warning ask

RISK: Lambda environment variables are stored in plaintext in CloudFormation/Terraform state and visible to anyone with lambda:GetFunction. FIX: Fetch secrets at runtime from AWS Secrets Manager or SSM Parameter Store (SecureString), or encrypt envs with a CMK.

Rule source requires an active Pro or Enterprise subscription.
aws-rds-unencrypted error block

RISK: RDS storage_encrypted = false leaves database snapshots, logs, and replicas unencrypted at rest, violating most compliance baselines (PCI/HIPAA/SOC2). FIX: Set storage_encrypted = true and specify kms_key_id for a customer-managed CMK.

Rule source requires an active Pro or Enterprise subscription.
aws-s3-block-public-access-disabled error block

RISK: Disabling aws_s3_bucket_public_access_block settings removes the safety net that prevents accidental public exposure — the leading cause of S3 data leaks. FIX: Leave all four Block Public Access flags at true unless the bucket is an intentional public static site.

Rule source requires an active Pro or Enterprise subscription.
aws-s3-public-read error block

Setting S3 buckets to 'public-read' exposes data to the entire internet. Ensure this is explicitly intended (e.g. for a static website) or use 'private' and enable Block Public Access (BPA).

Rule source requires an active Pro or Enterprise subscription.
aws-s3-sse-c-customer-key warning ask

RISK: SSE-C lets the caller supply the encryption key — the Codefinger ransomware campaign (Jan 2025) abused compromised credentials + SSE-C to encrypt victim S3 data with attacker-held keys. FIX: Prefer SSE-KMS with a customer-managed CMK so key material stays inside AWS KMS and access is auditable via CloudTrail.

Rule source requires an active Pro or Enterprise subscription.
aws-sg-open-db-ports error block

RISK: Database/cache ports (MySQL/Postgres/MSSQL/Mongo/Redis/Elastic/Couch) open to 0.0.0.0/0 are scanned and brute-forced within minutes. FIX: Restrict cidr_blocks to the app VPC/subnet or use security group references; never expose DB engines to the public internet.

Rule source requires an active Pro or Enterprise subscription.
aws-sg-open-ssh-rdp error block

Opening SSH (22) or RDP (3389) to 0.0.0.0/0 exposes management ports to the public internet, a massive security risk. Restrict to specific IP ranges or use AWS Systems Manager Session Manager.

Rule source requires an active Pro or Enterprise subscription.
log-aws-profile info log

AWS CLI command detected. Ensure AWS_PROFILE and AWS_DEFAULT_REGION are set correctly for the target environment.

Rule source requires an active Pro or Enterprise subscription.
no-aws-configure-secret-inline error block

RISK: Passing secret keys on the command line writes them to shell history and process listings (ps, /proc). FIX: Use 'aws configure' interactively, 'aws sso login', or set env vars in a file sourced once — never pass the secret as an argv.

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

IAM wildcard Action '*' grants full access to all AWS services. Use least-privilege — specify only the exact actions needed.

Rule source requires an active Pro or Enterprise subscription.
no-resource-star-with-write warning log

IAM Resource '*' applies permissions to all resources. Scope the resource ARN to the specific bucket, table, or service where possible.

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

Making an S3 bucket public exposes all objects to the internet. Use pre-signed URLs or CloudFront for controlled access instead.

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
v3
Published
Apr 8, 2026
Source commits
0
Synced
Oct 11, 2026
Hash
a1dc80e61f89c9b40e5be94531aef32ba3f44615e55e526e51ee8783be048a38
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

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

No commit history available.