VipulMadavi/S3-Sentinel

GitHub: VipulMadavi/S3-Sentinel

一款 AWS S3 存储桶安全配置扫描器,用于检测公开暴露、权限过宽、未加密等配置失误并生成风险评分报告。

Stars: 0 | Forks: 0

# S3 Sentinel **AWS S3 Bucket 暴露扫描器** — 检测配置错误、评估风险、导出报告。 ![Python](https://img.shields.io/badge/Python-3.12-blue) ![License](https://img.shields.io/badge/License-MIT-green) ![Status](https://img.shields.io/badge/Status-Alpha-orange) ## 功能简介 S3 Sentinel 会扫描您的 AWS S3 Bucket 以查找安全问题: - **公开访问检测** — 暴露在互联网上的 bucket 和对象 - **Bucket policy 分析** — 过于宽松的 policy - **ACL 检查** — 授予意外访问权限的旧版 ACL - **加密检查** — 静态未加密的数据 - **版本控制状态** — 针对意外删除的保护 - **日志审计** — 是否启用了访问日志记录 - **Lifecycle 规则** — 缺失的数据保留策略 - **数据敏感性** — 对暴露内容的启发式分类 - **风险评分** — 带有严重程度区间的 0–100 加权评分 ## 快速开始 ``` # 安装 pip install -e ".[dev]" # 配置 cp .env.example .env # 使用你的 AWS credentials 编辑 .env # 运行 s3-sentinel scan s3-sentinel scan --bucket my-bucket --format html s3-sentinel check --bucket my-bucket ``` ## Docker ``` docker build -t s3-sentinel . docker run --env-file .env s3-sentinel scan docker run --env-file .env s3-sentinel scan --bucket my-bucket --format json ``` ## 报告 以 JSON、CSV 或 HTML 格式导出结果: ``` s3-sentinel scan --format json --output ./reports s3-sentinel scan --format csv --output ./reports s3-sentinel scan --format html --output ./reports ``` ## 开发 ``` # 测试 pytest pytest --cov=s3_sentinel # Lint ruff check src/ tests/ --fix ruff format src/ tests/ # Type check mypy src/ ``` ## 测试基础设施 `terraform/` 中的 Terraform 配置会创建故意配置错误的 bucket,用于扫描器验证: ``` cd terraform && terraform init && terraform apply ``` ## 文档 - [架构](docs/ARCHITECTURE.md) — 系统设计与模式 - [演练](docs/WALKTHROUGH.md) — 设置与使用指南 ## 技术栈 Python 3.12 · Boto3 · Typer · Rich · Pydantic · Pandas · Pytest · Docker · Terraform · GitHub Actions ## 许可证 MIT
标签:AWS, Docker, DPI, ECS, Python, S3, Terraform, 安全防御评估, 无后门, 请求拦截, 足迹分析, 逆向工具