Williamclayfl/multi-cloud-serverless-compliance-lab

GitHub: Williamclayfl/multi-cloud-serverless-compliance-lab

基于无服务器事件驱动架构的跨云合规扫描与自动修复实验平台,帮助团队将多云环境下的安全审计从手动流程升级为自动化闭环。

Stars: 0 | Forks: 0

## 功能介绍 本项目利用无服务器事件驱动架构,自动化执行跨 AWS、Azure 和 GCP 的合规性扫描与修复。它能检测安全违规情况(例如公开的 S3 存储桶、未加密的 EBS 卷、对互联网开放的防火墙规则以及高风险的 IAM 授权)并自动进行修复。团队无需再进行耗时 10 小时的每周手动审计,只需花 2 小时审查证据日志,从而将审计开销降低了 80%。 ## 架构 ``` graph LR A["AWS: S3/EC2 API Changes"] -->|CloudTrail| B["EventBridge"] B -->|Trigger| C["Lambda Scanner"] C -->|Log Evidence| D["CloudWatch"] E["GCP: GCS/GCE API Changes"] -->|Cloud Audit Logs| F["Eventarc"] F -->|Trigger| G["Cloud Run Scanner"] G -->|Log Evidence| H["Cloud Logging"] I["Azure: NSG Rule Changes"] -->|Activity Log| J["Azure Monitor Alert"] J -->|Webhook| K["PowerShell Function"] K -->|Remediate & Log| L["Application Insights"] ``` ## 技术栈 ![AWS Lambda](https://img.shields.io/badge/AWS%20Lambda-FF9900?style=flat-square&logo=awslambda&logoColor=white) ![Python](https://img.shields.io/badge/Python-3776AB?style=flat-square&logo=python&logoColor=white) ![Google Cloud](https://img.shields.io/badge/Google%20Cloud-4285F4?style=flat-square&logo=googlecloud&logoColor=white) ![Azure](https://img.shields.io/badge/Azure-0078D4?style=flat-square&logo=microsoftazure&logoColor=white) ![PowerShell](https://img.shields.io/badge/PowerShell-5391FE?style=flat-square&logo=powershell&logoColor=white) ![EventBridge](https://img.shields.io/badge/EventBridge-FF9900?style=flat-square&logo=awseventbridge&logoColor=white) ## 设置 1. **前置条件** - 已配置 SSO 的 AWS 账户 - 具有参与者访问权限的 Azure 订阅 - 已启用 Compute 和 Storage API 的 GCP 项目 - Python 3.9+,Node.js 14+,PowerShell 7+ - AWS SAM CLI,Azure Functions Core Tools,Google Cloud CLI 2. **检查本地环境** .\scripts\check-prereqs.ps1 3. **在 VS Code 中打开** code . 出现提示时安装推荐的扩展。 4. **部署 AWS Lambda 扫描器** - 运行 VS Code 任务:`AWS: SSO login codex-admin` - 运行 VS Code 任务:`AWS: SAM build` - 通过 CloudFormation 或 SAM CLI 进行部署 5. **部署 GCP Cloud Run 扫描器** - 运行 VS Code 任务:`GCP: Verify active project` - 运行 VS Code 任务:`GCP: Deploy Cloud Run scanner` 6. **部署 Azure PowerShell Function** - 运行 VS Code 任务:`Azure: Deploy NSG enforcer dry run` - 审查更改,然后部署到生产环境 7. **验证部署** - AWS:检查 CloudWatch Logs 中的 `COMPLIANCE_VIOLATION` 事件 - GCP:运行 `GCP: Query scanner logs` 任务 - Azure:检查 Application Insights 中的修复记录 ## 结果 / 指标 - **审计时间减少**:80%(每周 10 小时 → 2 小时) - **验证的控制项**:跨 AWS、GCP 和 Azure 的 5 项 - **AWS**:S3 公开存储桶检测,EC2 启动扫描 - **GCP**:对互联网开放的 SSH/RDP 防火墙检测,公开的 Cloud Storage IAM 检测 - **Azure**:对互联网开放的 SSH/RDP NSG 规则修复 - **证据**:`evidence/` 目录中已脱敏的 CloudWatch、Cloud Logging 和 Application Insights 导出文件
标签:AI合规, Libemu, Serverless, 自动修复, 逆向工具