chxmxii/a3
GitHub: chxmxii/a3
a3 是一款基于 Steampipe 的终端云账号评估工具,一站式完成云资源发现、架构映射、安全合规检查、成本估算与报告生成。
Stars: 1 | Forks: 1
# A3 / 云厂商无关的账号评估
基于终端的云账号评估工具。发现资源、映射架构、评估安全态势、估算成本并生成报告。
目前通过 Steampipe 支持 AWS 和 OCI。
## 环境要求
- 已安装并配置好 AWS 或 OCI 插件的 Steampipe
- 有效的云凭证(只读访问权限即可)
- Go 1.24+
## 安装
一行命令安装(Linux 和 macOS):
```
curl -fsSL https://chxmxii.github.io/a3/install.sh | bash
```
使用 Go:
```
go install github.com/chxmxii/a3/cmd/a3@latest
```
使用 Docker/Podman:
```
docker pull ghcr.io/chxmxii/a3:latest
docker run --rm -v ~/.aws:/root/.aws -v ~/.a3:/root/.a3 ghcr.io/chxmxii/a3 assess
```
从源码构建:
```
git clone https://github.com/chxmxii/a3.git
cd a3
go build -o bin/a3 ./cmd/a3/
sudo cp bin/a3 /usr/local/bin/
```
## 使用方法
```
# 设置向导
a3 configure
# 运行完整评估
a3 assess
# 不使用 TUI 运行
a3 assess --no-tui
# 生成报告
a3 report --format -o report.
# Profile 管理
a3 profiles list
a3 profiles add production --provider aws --regions us-east-1,eu-west-1 --aws-profile prod-readonly
```
## 功能说明
1. 连接到 Steampipe 并通过 SQL 查询 25 种以上的云资源类型
2. 以两种视图重构架构:网络和资源。
3. 根据 CIS Benchmarks 和 Well-Architected Framework 评估 26 条安全规则
4. 从 AWS Cost Explorer 获取真实账单数据(回退至静态估算)
5. 计算基础设施规模(vCPU、内存、存储)
6. 生成自适应清单(PASS/FAIL/WARN)
7. 在交互式 TUI 中显示所有内容,或导出为 Markdown/JSON/Excel
## TUI 控制
| 按键 | 操作 |
|-----|--------|
| 1-5 | 切换视图(概览、清单、架构、发现、成本) |
| j/k | 上下滚动 |
| Enter | 查看资源详情(针对安全组、路由表、IAM 策略进行类型感知) |
| Esc/x | 关闭详情面板 / 清除过滤器 |
| r/R | 循环切换区域(清单) |
| t/T | 循环切换资源类型(清单) |
| n/v | 切换网络/资源架构视图 |
| c/h/m/l | 按严重程度过滤(发现) |
| q | 退出 |
## 配置
配置文件存储在 `~/.a3/config.yaml` 中:
```
db_path: ~/.a3/a3.db
steampipe:
connection_string: postgres://steampipe@localhost:9193/steampipe
profiles:
- name: production
provider: aws
aws_profile: prod-readonly
regions:
- us-east-1
- eu-west-1
```
评估数据存储在 `~/.a3/a3.db` 的 SQLite 中。
## Steampipe 设置
```
steampipe plugin install
steampipe service start
```
在 `~/.steampipe/config/aws.spc` 中配置凭证:
```
connection "aws" {
plugin = "aws"
profile = "your-aws-profile"
regions = ["*"] # All regions
}
```
或者使用 `a3 configure` 通过 a3 向导完成所有设置。
## 许可证
MIT标签:AWS, DPI, EVTX分析, Go, Ruby工具, 云计算, 云资源配置审计, 日志审计, 自动化审计工具, 规则引擎, 请求拦截