davidgomezbravo/aws-audit
GitHub: davidgomezbravo/aws-audit
一款免费、只读的 AWS 安全与成本审计 CLI 工具,通过 30 项检查清单快速扫描账户并输出按优先级排序的报告。
Stars: 1 | Forks: 0
# aws-audit — 我在客户账户上运行的 AWS 安全检查清单
一款免费、**只读** 的 AWS 安全与成本审计 CLI。将其指向某个账户,它就会执行
一位兼职 CTO 在付费审计前所使用的 30 项检查清单,然后输出一份按优先级
排序的报告。**它只会发起 `Describe`/`List`/`Get` 调用 —— 绝不会创建、
修改或删除任何内容,也不会有任何数据离开你的机器。**
```
$ aws-audit
AWS Security Audit · aws-audit
Account 123456789012 · regions: us-east-1
────────────────────────────────────────────────────────────────
CRITICAL [IAM-1] Root account MFA — FAIL
Root account does NOT have MFA enabled.
fix: Enable a hardware or virtual MFA device on the root user and stop using root.
HIGH [IAM-2] Long-lived IAM access keys — FAIL
2 active access key(s) older than 90 days.
affected: deploy-bot:7Q4A (412d), ci-user:9F1C (203d)
fix: Rotate or delete keys older than 90 days; prefer IAM Identity Center (SSO).
...
1 fail · 3 warn · 18 pass
Want this done for you — and the issues fixed? → https://services.itsdavidg.co
```
## 安装
```
pipx install aws-audit-checklist # recommended
# 或
pip install aws-audit-checklist
```
## 用法
```
aws-audit # uses your default AWS credential chain + region
aws-audit --profile myprofile # a named profile
aws-audit --all-regions # run regional checks in every enabled region
aws-audit --markdown report.md # export a Markdown report
aws-audit --json # machine-readable output
aws-audit --strict # exit non-zero if anything FAILs (CI gate)
```
你只需要**只读** 凭证。类似
`SecurityAudit` 或 `ReadOnlyAccess` 这样的内置 AWS 托管策略就足够了。如果你缺乏执行某些检查的权限,
这些检查会被标记为 "could-not-check",而不会导致运行失败。
## 检查内容(30 项检查清单)
| 领域 | 示例 |
|------|----------|
| **身份验证 (IAM)** | root MFA,超过 90 天的 access keys,未启用 MFA 的控制台用户,密码策略 |
| **网络** | 向 `0.0.0.0/0` 暴露 SSH/RDP 的安全组 |
| **数据** | S3 公开存储桶及默认加密,EBS 默认加密,RDS 公开访问/加密/备份 |
| **日志记录** | 多区域 CloudTrail、GuardDuty、AWS Config |
| **成本信号** | 未挂载的 EBS 卷、未使用的 Elastic IP |
包含所有人类可读检查项的完整检查清单(包括尚未自动化的项目 —— 事件处理手册、
多可用区部署、IaC、异地备份)在此处:
**[30 项 AWS 安全检查清单 PDF](https://services.itsdavidg.co/#checklist)**。
## 开发动机
我是 David Gomez —— 我从事兼职 CTO 工作并负责 AWS 安全/成本审计。我过去常常在每个
账户上手动执行这份相同的检查清单,因此我将其中可自动化的部分开源了。如果你
希望有人为你完成全部工作 —— 包括手动检查项,并切实*修复*发现的
问题,而且带有保障 —— 这就是我的 [AWS 完整安全审计](https://services.itsdavidg.co)。
## 许可证
MIT。可自由使用。不提供任何担保 —— 它只是一个辅助工具,不能替代真正的审查。
标签:AWS, Blue Team, DPI, Python, 无后门, 逆向工具