prompt-general/storageguard

GitHub: prompt-general/storageguard

多云存储安全与 IaC 分析平台,支持实时监控、敏感数据检测和合规性检查,实现从代码到云端的存储安全闭环。

Stars: 0 | Forks: 0

# 🛡️ StorageGuard [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Build Status](https://img.shields.io/github/actions/workflow/status/yourusername/storageguard/ci.yml?branch=main)](https://github.com/yourusername/storageguard/actions) [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/) [![NestJS](https://img.shields.io/badge/NestJS-10.0-red.svg)](https://nestjs.com/) [![Docker](https://img.shields.io/badge/Docker-Compose-2496ED.svg?logo=docker&logoColor=white)](https://www.docker.com/) ## 🚀 概述 **StorageGuard** 是一款综合安全工具,旨在检测云存储生态系统中的错误配置、敏感数据泄露和合规违规问题。无论您是通过代码部署基础设施还是管理现有的存储桶,StorageGuard 都能提供所需的可视性和控制力,助您保持安全。 该工具基于现代微服务架构构建,支持 **AWS**、**Azure** 和 **GCP**,为基础设施即代码 模板提供实时监控和静态分析功能。 ## ✨ 核心功能 | 功能 | 描述 | | :--- | :--- | | **☁️ 多云支持** | 原生扫描 AWS S3、Azure Blob Storage 和 Google Cloud Storage。 | | **🔍 IaC 安全分析** | 在部署前扫描 Terraform (`.tf`) 和 CloudFormation 模板,实现安全左移。 | | **⚡ 实时监控** | 使用 SQS/EventGrid/PubSub 的 Event-driven 架构,即时检测变更。 | | **🔐 敏感信息扫描** | 自动识别存储对象中的 PII、凭证和密钥。 | | **📊 动态风险评分** | 基于暴露程度和数据敏感性,通过智能风险评分确定修复优先级。 | | **🧩 模块化架构** | 可扩展设计,包含独立的 API、Scanner 和 Processing 服务。 | ## 🏗️ 架构 StorageGuard 采用微服务架构以确保可扩展性和弹性。 ``` graph TD User[User / CI Pipeline] -->|API Request| API[API Service] User -->|CLI Command| CLI[CLI Tool] subgraph Core Services API -->|Manage Findings| DB[(PostgreSQL)] API -->|Queue Jobs| Redis[(Redis)] Scanner[Scanner Service] -->|Process Jobs| Redis Scanner -->|Store Results| DB end subgraph Cloud Providers Scanner -->|Scan| AWS[AWS S3] Scanner -->|Scan| Azure[Azure Blob] Scanner -->|Scan| GCP[GCP Storage] end subgraph Event Ingestion Events[Cloud Events] -->|SQS/EventGrid| Scanner end ``` ### 组件 - **`apps/api`**: 中央控制平面。一个 NestJS 应用程序,负责处理用户请求、管理发现结果并协调扫描。 - **`apps/scanner`**: 核心工作引擎。一个独立的服务,负责执行扫描任务、连接云提供商并进行深度分析。 - **`apps/cli`**: 对开发者友好的命令行界面,用于将 StorageGuard 集成到流水线和本地工作流中。 - **`packages/database`**: 共享 TypeORM 数据访问层。 - **`packages/shared`**: 通用工具和辅助函数。 ## 🛠️ 快速入门 ### 前置条件 - **Node.js** (v18+) - **Docker & Docker Compose** - **npm** (v9+) ### 安装 1. **克隆代码库:** git clone https://github.com/MasterCaleb254/storageguard.git cd storageguard 2. **安装依赖项:** npm install 3. **设置环境变量:** 复制示例 `.env` 文件并配置您的凭证。 cp .env.example .env 4. **启动基础设施:** 使用 Docker Compose 启动 PostgreSQL 和 Redis。 docker-compose up -d 5. **运行数据库迁移:** npm run db:migrate ### 本地运行 启动所有服务的开发服务器: ``` # 启动 API Service npm run dev:api # 启动 Scanner Service(在单独的终端中) npm run dev:scanner ``` ## 📖 使用说明 ### 通过 CLI 扫描 Terraform 目录以查找安全问题: ``` # 全局安装 CLI(可选) npm install -g @storageguard/cli # 运行扫描 storageguard scan --path ./infrastructure --type terraform ``` ### 通过 API 通过编程方式提交扫描任务: ``` curl -X POST http://localhost:3000/scans \ -H "Content-Type: application/json" \ -d '{ "target": "s3://my-sensitive-bucket", "provider": "aws", "scanType": "deep" }' ``` ## 🚦 路线图 - [x] 核心扫描引擎 (AWS, Azure) - [x] IaC 静态分析 - [ ] GCP 支持完善 - [ ] Web 仪表板 (Next.js) - [ ] 一键修复 - [ ] 合规性报告 (SOC2, HIPAA) ## 🤝 贡献 我们欢迎贡献!请参阅我们的 [CONTRIBUTING.md](CONTRIBUTING.md) 了解如何提交 Pull Request、报告问题并提出改进建议。 1. Fork 本项目 2. 创建您的 Feature Branch (`git checkout -b feature/AmazingFeature`) 3. 提交您的更改 (`git commit -m 'Add some AmazingFeature'`) 4. 推送到 Branch (`git push origin feature/AmazingFeature`) 5. 打开一个 Pull Request ## 📄 许可证 根据 MIT 许可证分发。更多信息请参阅 `LICENSE`。

Built with ❤️

标签:CloudFormation, CSPM, DevSecOps, Docker, GCP 安全, LNA, MITM代理, NestJS, PII 检测, S3 安全, Terraform 扫描, TinkerPop, TypeScript, 上游代理, 云存储安全, 图计算, 安全插件, 安全防御评估, 密钥泄露检测, 属性图, 微服务架构, 搜索引擎查询, 敏感数据发现, 测试用例, 网络扫描, 自动化攻击, 请求拦截, 配置错误检测, 风险评分