carlosinfantes/cloudsecure
GitHub: carlosinfantes/cloudsecure
基于 AI 的无代理 AWS 安全评估平台,以 serverless 方式扫描多账户并提供 AI 综合分析与合规报告。
Stars: 6 | Forks: 1
CloudSecure
基于 AI 的 AWS 安全评估平台
无代理、serverless 的安全评估平台,可扫描任何 AWS 账户并提供 AI 综合的分析结果——无需共享凭证、无需安装代理、无需管理基础设施。 ## 问题所在 传统的安全工具(Prowler、ScoutSuite、Steampipe)运行在工程师的笔记本电脑上: - 需要长期有效的凭证(access keys) - 凭证在网络中传输并存储在本地 - 没有关于谁在何时运行了什么的审计跟踪 - 扩展到多个账户 = 纯手工操作 ## CloudSecure 的不同之处 CloudSecure **100% 在 AWS 内以 serverless 方式运行**。没有 CLI,没有笔记本电脑,不需要共享凭证。 - **通过 IAM role 委派访问权限** — 客户通过 `STS AssumeRole` 和 `ExternalId` 授予只读 role。无需交换凭证,仅委派信任。 - **完全 serverless** — Lambda、Step Functions、DynamoDB、S3。无需安装、修补或维护任何东西。 - **AI 驱动的综合分析** — 7 个 analyzer 并行运行,Bedrock Claude 将原始发现综合为优先的、可操作的情报。 - **设计上即可审计** — 每次评估都会在 DynamoDB 中进行跟踪,并通过 Step Functions 提供完整的执行记录。 ## 报告演示 CloudSecure 生成专业的 HTML 报告,包含基于 AI 的执行摘要、风险评分以及涵盖所有安全领域的详细发现。 ### 评估标题与风险评分  ### 发现摘要  ### AI 驱动的执行摘要  ### 按类别划分的详细发现  ## 架构 ``` ┌──────────────────────────────────────────────────────────────┐ │ CloudSecure Platform │ │ │ │ ┌──────────┐ ┌───────────────┐ ┌────────────────────────┐ │ │ │ API │──│ Step Functions │──│ 7 Lambda Analyzers │ │ │ │ Gateway │ │ Orchestrator │ │ (parallel execution) │ │ │ └──────────┘ └───────────────┘ └────────────────────────┘ │ │ │ │ │ │ │ ┌──────────┐ ┌───────────────┐ ┌────────────────────────┐ │ │ │ DynamoDB │ │ Bedrock │ │ S3 Reports │ │ │ │ │ │ Claude AI │ │ (HTML/JSON/CSV) │ │ │ └──────────┘ └───────────────┘ └────────────────────────┘ │ └──────────────────────────────────────────────────────────────┘ │ STS AssumeRole (read-only) ▼ ┌──────────────────────┐ │ Customer Account │ │ (no agents needed) │ └──────────────────────┘ ``` ## Analyzers | Analyzer | 检查内容 | |----------|---------------| | **IAM** | Users、roles、policies、MFA、未使用的凭证、密码策略 | | **Network** | 安全组、VPC、Flow Logs、公开暴露情况 | | **S3** | 公开 bucket、加密、日志记录、版本控制 | | **Encryption** | EBS、RDS、EFS 静态加密 | | **CloudTrail** | Trail 配置、root 使用情况、metric filter | | **Native Services** | SecurityHub、GuardDuty、Config 发现(如果已启用) | | **Prowler** | CIS AWS 1.4 基准(17 项关键检查) | 所有 analyzer 都通过 Step Functions 并行运行。缺失的安全服务会被报告为发现,而不是阻碍因素。 ## 合规性映射 发现结果映射至:**CIS AWS 1.4** · **NIST 800-53** · **ISO 27001** · **GDPR** · **SOC2** ## 快速开始 ### 前置条件 - 配置了 IAM profile 的 AWS CLI - Node.js 18+ 和 Python 3.12+ - Docker 或 Podman(可选 — Prowler CIS 扫描器必需) ### 安装 CLI ``` pip install cloudsecure # 或 pipx install cloudsecure ``` 或使用安装脚本: ``` curl -fsSL https://raw.githubusercontent.com/carlosinfantes/cloudsecure/main/install.sh | bash ``` ### 部署基础设施 交互式引导部署: ``` git clone https://github.com/carlosinfantes/cloudsecure.git && cd cloudsecure ./deploy.sh ``` 或手动部署: ``` cp .env.example .env # Edit with your AWS profile, region, etc. make install && make deploy # 不使用 Docker/Podman 部署(跳过 Prowler) SKIP_PROWLER=true make deploy ``` ### 接入客户账户 ``` aws cloudformation deploy \ --template-file onboarding/cloudformation/cloudsecure-role.yaml \ --stack-name CloudSecure-AssessmentRole \ --capabilities CAPABILITY_NAMED_IAM \ --parameter-overrides ExternalId=your-external-id ``` ### 升级组件 ``` # 升级所有内容(基础设施 + Prowler + CLI) ./deploy.sh --upgrade # 仅升级特定组件 ./deploy.sh --upgrade infra # Redeploy CDK stacks ./deploy.sh --upgrade prowler # Pull latest Prowler image + redeploy ./deploy.sh --upgrade cli # Upgrade CLI from PyPI ``` ### 运行评估 ``` # 启动评估 — 默认扫描所有内容 cloudsecure --profile YOUR_PROFILE assess \ --account-id 123456789012 \ --role-arn arn:aws:iam::123456789012:role/CloudSecureAssessmentRole \ --external-id your-external-id # 仅扫描特定服务 cloudsecure --profile YOUR_PROFILE assess \ --account-id 123456789012 \ --role-arn arn:aws:iam::123456789012:role/CloudSecureAssessmentRole \ --external-id your-external-id \ --scope iam --scope s3 # 列出所有评估 cloudsecure --profile YOUR_PROFILE status # 检查特定评估 cloudsecure --profile YOUR_PROFILE status标签:AI分析, AWS, DPI, XSS跨站脚本, 反取证, 安全评估, 对称加密, 自动化审计, 请求拦截, 逆向工具