面向 Azure 的开源云安全态势管理(CSPM)——检测错误配置,将其映射到 CIS / NIST / ISO 27001 / SOC 2,通过一条命令完成修复,并识别需要量子安全迁移的加密资产。
发布产物包含 SHA-256 校验和、SBOM 以及身份绑定的来源证明。参见发布验证。
Wiz、Prisma Cloud 和 Microsoft Defender for Cloud 等企业级云安全工具每年花费 50,000–500,000 美元。
初创公司、中小企业、大学和学生团队对其 Azure 安全态势毫无可见性。一个配置错误的存储 Blob、一个权限过大的服务主体,或一条开放的 NSG 规则,可能数月都无人察觉。
OpenShield 改变了这一切。
攻击者如今正在收集加密的 Azure 流量,以便在量子计算机可用时将其解密。这被称为“先收集、后解密”(Harvest Now Decrypt Later)攻击,而且它正在发生。
OpenShield 扫描 Azure 中需要尽早迁移的经典加密资产:
检测结果映射到 NIST FIPS 203(ML-KEM)、FIPS 204(ML-DSA)和 FIPS 205(SLH-DSA),并直接用于后量子迁移规划。
OpenShield 已获得 OpenSSF Best Practices Passing Badge,在项目治理、变更控制、报告、质量、安全和代码分析方面完成了 100% 适用的 Passing 级别标准。
OpenSSF Best Practices - Passing
该项目的 OpenSSF 状态可通过官方 OpenSSF Best Practices 项目记录公开验证。OpenShield 在推进更高级别标准的过程中,持续加强其工程、安全保障和开源治理实践。
查看 OpenShield 经验证的 OpenSSF Best Practices 记录
项目策略和保障证据:
flowchart TD
A["React Dashboard\nVercel · Live"]
B["Flask REST API\nJWT · CORS · Blueprints"]
C["Scanner Engine\n95 Python rules"]
D["Azure Subscription\nScanned via Azure SDK + Graph"]
E["Compliance Framework JSON\nCIS · NIST · ISO 27001 · SOC 2"]
F["PostgreSQL Database\nFindings · Scans"]
G["Azure CLI Playbooks\n95 remediation scripts"]
H["sentinel/ingest.py\nNormalise + HMAC upload"]
I["Microsoft Sentinel\nOpenShieldFindings_CL · KQL rules"]
A -->|REST calls| B
B -->|trigger scans| C
B -->|read/write| F
B -->|compliance score| E
C -->|Azure SDK + Graph| D
C -->|findings| F
C -->|scan output JSON| H
G -->|manual fixes| D
H -->|Data Collector API| I
I -->|alerts| A| 服务 | URL |
|---|---|
| 安全仪表板(Vercel) | https://openshield-gules.vercel.app |
| REST API(Render) | https://openshield-api.onrender.com |
注意: API 托管在 Render 上。仪表板在加载时自动连接,并显示来自 PostgreSQL 数据库的实时数据。
[!IMPORTANT] 安全要求: 如果
JWT_SECRET缺失、被设置为不安全的默认值或长度少于 32 个字符,生产部署将在启动时失败。使用以下命令生成强密钥:python -c "import secrets; print(secrets.token_urlsafe(32))"设置
OPENSHIELD_ENV=production(或依赖 Render 自动设置的RENDER=true)以启用此强制要求。没有这些信号的本地开发运行允许使用默认值,但会发出警告。
openshield/
├── scanner/ # Azure misconfiguration rule engine
│ ├── rules/ # Individual scan rules (contribute here!)
│ ├── engine.py # Core scanning orchestration
│ └── azure_client.py # Azure SDK wrapper
├── compliance/ # Framework mapping engine
│ └── frameworks/ # CIS, NIST, ISO 27001, SOC 2 mappings
├── playbooks/ # Remediation playbooks
│ ├── arm/ # Reserved for future ARM templates
│ ├── terraform/ # Reserved for future Terraform fixes
│ └── cli/ # Azure CLI scripts
├── api/ # Flask REST API
│ ├── routes/
│ └── models/
├── frontend/ # React security dashboard (Vercel)
├── website/ # Project website - docs, blog, rules gallery (Vercel)
├── sentinel/ # Sentinel integration & KQL rules
├── .github/workflows/ # CI checks
├── docs/ # Documentation
├── CONTRIBUTING.md
└── README.md
后端(Flask API + 扫描器)
# Clone the repo
git clone https://github.com/openshield-org/openshield.git
cd openshield
# Install Python dependencies
pip install -r requirements.txt
# Set your Azure credentials
export AZURE_SUBSCRIPTION_ID=your-subscription-id
export AZURE_CLIENT_ID=your-client-id
export AZURE_CLIENT_SECRET=your-client-secret
export AZURE_TENANT_ID=your-tenant-id
export JWT_SECRET=your-strong-secret # used to protect write endpoints (scan trigger, AI)
export DATABASE_URL=postgresql://openshield:openshield@localhost:5432/openshield
# Create or update the database schema
alembic upgrade head
# Run a scan
python -c "
from scanner.engine import ScanEngine
import json, os
result = ScanEngine(os.environ['AZURE_SUBSCRIPTION_ID']).run_scan()
print(json.dumps(result, indent=2))
"
# Start the API
FLASK_APP=api/app.py flask run
有关架构变更以及现有生产数据库所需的一次性入门步骤,请参见数据库迁移。
本地容器(Compose)
# Starts PostgreSQL 16, applies migrations, then starts the API, worker, and dashboard
docker compose --profile local up --build
# Database-aware API readiness
curl --fail http://127.0.0.1:8000/ready
该配置文件被有意命名为 local:其数据库凭据和 JWT 密钥仅用于开发,端口绑定到回环地址,仪表板与 http://localhost:8000 通信。如果你希望 worker 执行真实扫描,请在启动 Compose 之前在你的 shell 中设置四个 AZURE_* 变量。使用 docker compose --profile local down 停止堆栈;仅当你确实想要删除本地数据库和前端依赖数据时,才添加 --volumes。
前端(React 仪表板)
cd frontend
npm install
# Local dev - points at http://localhost:5000 by default
npm run dev
# To develop against the live Render backend:
VITE_API_URL=https://openshield-api.onrender.com npm run dev
在公共演示模式下不需要令牌。默认情况下,API 端点需要 JWT,而 POST 端点始终需要一个。
我们积极欢迎各级学生和开发者贡献。
贡献方式:
有关完整指南,包括如何在 30 分钟内添加你的第一条规则,请参见 CONTRIBUTING.md。
贡献者名单见下方。
MIT——可自由使用、修改和分发。
由相信云安全工具应人人可用的安全工程师和学生构建。
学习 OpenShield 涵盖:
在线学习门户:https://openshieldlearn.netlify.app/learn/ 完整文档、安全规则库、架构指南、证据指南和博客可在项目网站获取:
openshield-org.github.io/openshield
完整 API 文档见 docs/api-reference.md。
完整发布历史见 CHANGELOG.md。
| 功能 | 描述 |
|---|
| 错误配置扫描器 | 在存储、网络、身份、数据库、计算、Key Vault、AKS、后量子密码学、备份、无服务器、私有终结点和供应链态势方面运行 95 条 Azure 安全规则 |
| 合规映射器 | 将检测结果映射到 CIS Benchmarks、NIST CSF、ISO 27001 和 SOC 2 框架 JSON 文件 |
| 扫描历史 API | 将扫描和检测结果存储在 PostgreSQL 中,并通过 REST 暴露检测结果、评分、扫描历史、合规态势、漂移和资源清单 |
| 修复手册 | 每条规则都附带匹配的 Azure CLI 修复脚本(95 个手册) |
| 安全仪表板 | 部署在 Vercel 上的完整 React 仪表板——实时监控、检测结果、合规、漂移、优先级排序和 AI 层视图 |
| 项目网站 | 位于 openshield-org.github.io/openshield 的文档和参考站点——博客、规则库、架构、证据指南、路线图和发布 |
| Sentinel 集成 | 规范化检测结果,并通过 Log Analytics 自定义表和 KQL 分析规则将其推送到 Microsoft Sentinel |
https://openshield-org.github.io/openshield/ |
| 层级 | 技术 | 成本 |
|---|
| 项目网站 | 静态 HTML + Tailwind CDN,部署在 Vercel 上 | 免费 |
| 安全仪表板 | React + Vite + Tailwind,部署在 Vercel 上 | 免费 |
| 后端 API | Python + Flask | 免费 |
| 数据库 | PostgreSQL | Render 托管 PostgreSQL |
| 云扫描器 | Python + Azure SDK | 免费 |
| 修复 | Azure CLI 手册 | 免费 |
| SIEM | Microsoft Sentinel | 90 天免费试用 |
| CI/CD | GitHub Actions | 免费 |
| 仓库 | GitHub | 免费 |