跳到正文
Skillpedia
安全48k · #5707

aws-security-audit

它能做什么

这个技能用来检查你的 Amazon Web Services(AWS)云账户的安全性。它会查找可能让你的数据和系统容易受到攻击的设置。

适用场景

  • ✓正式安全审计之前。
  • ✓对 AWS 账户做了重大改动之后。
  • ✓定期检查,确保一切安全。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/security/aws-security-audit/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/security/aws-security-audit/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“帮我检查一下我的 AWS 账户安全性。”

每周 5 个新技能,1 分钟读完。

工作原理

这个技能会通过 AWS 命令检查访问权限、网络安全和数据保护等重要安全设置,并列出存在的不安全之处,方便你修复。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

AWS Security Audit

Perform comprehensive security assessments of AWS environments to identify vulnerabilities and misconfigurations.

When to Use

Use this skill when you need to audit AWS security posture, identify vulnerabilities, or prepare for compliance assessments.

Audit Categories

Identity & Access Management

  • Overly permissive IAM policies
  • Unused IAM users and roles
  • MFA enforcement gaps
  • Root account usage
  • Access key rotation

Network Security

  • Open security groups (0.0.0.0/0)
  • Public S3 buckets
  • Unencrypted data in transit
  • VPC flow logs disabled
  • Network ACL misconfigurations

Data Protection

  • Unencrypted EBS volumes
  • Unencrypted RDS instances
  • S3 bucket encryption disabled
  • Backup policies missing
  • KMS key rotation disabled

Logging & Monitoring

  • CloudTrail disabled
  • CloudWatch alarms missing
  • VPC Flow Logs disabled
  • S3 access logging disabled
  • Config recording disabled

Security Audit Commands

IAM Security Checks

# List users without MFA
aws iam get-credential-report --output text | \
  awk -F, '$4=="false" && $1!="<root_account>" {print $1}'

# Find unused IAM users (no activity in 90 days)
aws iam list-users --query 'Users[*].[UserName]' --output text | \
while read user; do
  last_used=$(aws iam get-user --user-name "$user" \
    --query 'User.PasswordLastUsed' --output text)
  echo "$user: $last_used"
done

# List overly permissive policies (AdministratorAccess)
aws iam list-policies --scope Local \
  --query 'Policies[?PolicyName==`AdministratorAccess`]'

# Find access keys older than 90 days
aws iam list-users --query 'Users[*].UserName' --output text | \
while read user; do
  aws iam list-access-keys --user-name "$user" \
    --query 'AccessKeyMetadata[*].[AccessKeyId,CreateDate]' \
    --output text
done

# Check root account access keys
aws iam get-account-summary \
  --query 'SummaryMap.AccountAccessKeysPresent'

Network Security Checks

# Find security groups open to the world
aws ec2 describe-security-groups \
  --query 'SecurityGroups[?IpPermissions[?IpRanges[?CidrIp==`0.0.0.0/0`]]].[GroupId,GroupName]' \
  --output table

# List public S3 buckets
aws s3api list-buckets --query 'Buckets[*].Name' --output text | \
while read bucket; do
  acl=$(aws s3api get-bucket-acl --bucket "$bucket" 2>/dev/null)
  if echo "$acl" | grep -q "AllUsers"; then
    echo "PUBLIC: $bucket"
  fi
done

# Check VPC Flow Logs status
aws ec2 describe-vpcs --query 'Vpcs[*].VpcId' --output text | \
while read vpc; do
  flow_logs=$(aws ec2 describe-flow-logs \
    --filter "Name=resource-id,Values=$vpc" \
    --query 'FlowLogs[*].FlowLogId' --output text)
  if [ -z "$flow_logs" ]; then
    echo "No flow logs: $vpc"
  fi
done

# Find RDS instances without encryption
aws rds describe-db-instances \
  --query 'DBInstances[?StorageEncrypted==`false`].[DBInstanceIdentifier]' \
  --output table

Data Protection Checks

# Find unencrypted EBS volumes
aws ec2 describe-volumes \
  --query 'Volumes[?Encrypted==`false`].[VolumeId,Size,State]' \
  --output table

# Check S3 bucket encryption
aws s3api list-buckets --query 'Buckets[*].Name' --output text | \
while read bucket; do
  encryption=$(aws s3api get-bucket-encryption \
    --bucket "$bucket" 2>&1)
  if echo "$encryption" | grep -q "ServerSideEncryptionConfigurationNotFoundError"; then
    echo "No encryption: $bucket"
  fi
done

# Find RDS snapshots that are public
aws rds describe-db-snapshots \
  --query 'DBSnapshots[*].[DBSnapshotIdentifier]' --output text | \
while read snapshot; do
  attrs=$(aws rds describe-db-snapshot-attributes \
    --db-snapshot-identifier "$snapshot" \
    --query 'DBSnapshotAttributesResult.DBSnapshotAttributes[?AttributeName==`restore`].AttributeValues' \
    --output text)
  if echo "$attrs" | grep -q "all"; then
    echo "PUBLIC SNAPSHOT: $snapshot"
  fi
done

# Check KMS key rotation
aws kms list-keys --query 'Keys[*].KeyId' --output text | \
while read key; do
  rotation=$(aws kms get-key-rotation-status --key-id "$key" \
    --query 'KeyRotationEnabled' --output text 2>/dev/null)
  if [ "$rotation" = "False" ]; then
    echo "Rotation disabled: $key"
  fi
done

Logging & Monitoring Checks

# Check CloudTrail status
aws cloudtrail describe-trails \
  --query 'trailList[*].[Name,IsMultiRegionTrail,LogFileValidationEnabled]' \
  --output table

# Verify CloudTrail is logging
aws cloudtrail get-trail-status --name my-trail \

…
常见问题

什么是“过于宽松的 IAM 策略”?

这些规则授予的权限超过了用户或程序的实际需要,会增加被滥用的风险。

什么是“开放的安全组”?

安全组好比 AWS 网络中的安全门。如果它对互联网上的任何人开放,就可能带来危险。

为什么要检查“root 账户的使用情况”?

“root”账户拥有完全权限。日常工作中使用它风险很大,最好只用它创建其他管理员账户,然后做好安全防护。

详情

作者的原始描述

Comprehensive AWS security posture assessment using AWS CLI and security best practices

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5707
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能