cognis-digital/cspm

GitHub: cognis-digital/cspm

从云配置导出文件中检测安全态势的轻量级 CLI 工具,无需实时云端连接即可发现配置风险。

Stars: 0 | Forks: 0

CSPM # CSPM ### 从配置导出获取云安全态势(公共存储桶、开放的安全组、脆弱的 IAM) [![PyPI](https://img.shields.io/pypi/v/cognis-cspm.svg?color=6b46c1)](https://pypi.org/project/cognis-cspm/) [![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/85a6039b12061040.svg)](https://github.com/cognis-digital/cspm/actions) [![License: COCL 1.0](https://img.shields.io/badge/License-COCL%201.0-2b6cb0.svg)](LICENSE) [![Suite](https://img.shields.io/badge/Cognis-Neural%20Suite-6b46c1.svg)](https://github.com/cognis-digital) *Cognis Neural Suite 的一部分。*
``` pip install cognis-cspm cspm scan . # → prioritized findings in seconds ``` ## 用法 — 分步说明 1. 安装 CLI (Python 3.9+): pip install cspm # 或者:从检出版本执行 pip install . 2. 扫描云配置导出 — `scan` 子命令针对您拥有的配置评估安全态势检查(无实时云端调用): cspm scan export.json `table` 视图按严重程度(CRITICAL/HIGH/MEDIUM/LOW/INFO)对发现项进行分组,并为每个发现项提供修复建议。 3. 生成可共享的 HTML 报告或机器可读的 JSON: cspm scan export.json --format html > posture.html cspm scan export.json --format json > posture.json 4. 读取结果 — 解析摘要以进行分类筛选: cspm scan export.json --format json | jq '.summary.by_severity' 5. 在 CI 中基于安全态势进行拦截 — 在每次配置变更时突出显示高严重程度的发现项: cspm scan export.json --format json | jq -e '.summary.by_severity.CRITICAL == 0' ## 目录 - [为什么选择 cspm?](#why) · [功能](#features) · [快速开始](#quick-start) · [示例](#example) · [架构](#architecture) · [AI 技术栈](#ai-stack) · [对比分析](#how-it-compares) · [集成](#integrations) · [随处安装](#install-anywhere) · [相关项目](#related) · [贡献指南](#contributing) ## 为什么选择 cspm? 从配置导出获取云安全态势(公共存储桶、开放的安全组、脆弱的 IAM)— 无需搭建重量级的基础设施。 `cspm` 专注单一功能、可脚本化且支持自托管:将其指向目标,以您的工作流已习惯的格式(table · JSON · SARIF)获取确定优先级的结果,在 CI 中据此进行拦截,并允许 AI agent 通过 MCP 驱动它。
↑ 回到顶部
## 功能 - ✅ 加载配置 - ✅ 扫描 - ✅ 汇总 - ✅ 可在 Linux/macOS/Windows · Docker · devcontainer 上运行 - ✅ 提供 Python、JavaScript、Go 和 Rust 的移植版本 (`ports/`)
↑ 回到顶部
## 快速开始 ``` pip install cognis-cspm cspm --version cspm scan . # scan current project cspm scan . --format json # machine-readable cspm scan . --fail-on high # CI gate (non-zero exit) ```
↑ 回到顶部
## 示例 ``` $ cspm scan . [HIGH ] CSP-001 example finding (./src/app.py) [MEDIUM ] CSP-002 another signal (./config.yaml) 2 findings · risk score 5 · 38ms ```
↑ 回到顶部
## 架构 ``` flowchart LR IN[target / manifest] --> P[cspm
checks + rules] P --> OUT[findings (JSON / SARIF)] ```
↑ 回到顶部
## 从任何 AI 技术栈中使用 `cspm` 与所有流行的 AI 使用方式互通: - **MCP 服务器** — `cspm mcp` (Claude Desktop, Cursor, Cognis.Studio, [uncensored-fleet](https://github.com/cognis-digital/uncensored-fleet)) - **兼容 OpenAI / JSON** — 将 `cspm scan . --format json` 管道传递给任何 agent 或 LLM - **LangChain · CrewAI · AutoGen · LlamaIndex** — 一行代码即可将 CLI/JSON 封装为工具 - **CI / 脚本** — 提供 exit code + SARIF 用于非 AI 流水线
↑ 回到顶部
## 对比分析 | | **Cognis cspm** | 典型工具 | |---|:---:|:---:| | 支持自托管,无需账号 | ✅ | 视情况而定 | | 单条命令,零配置 | ✅ | ⚠️ | | 面向 CI 的 JSON + SARIF | ✅ | 视情况而定 | | 原生 MCP (AI agent) | ✅ | ❌ | | 多语言移植 (JS/Go/Rust) | ✅ | ❌ | | 开源许可 | ✅ COCL | 视情况而定 |
↑ 回到顶部
## 集成 接入您的技术栈:用于代码扫描的 **SARIF**,用于任何场景的 **JSON**,用于 AI agent 的 **MCP 服务器** (`cspm mcp`),以及用于 SIEM/Slack/Jira 的 webhook 转发器。参见 [`docs/INTEGRATIONS.md`](docs/INTEGRATIONS.md)。
↑ 回到顶部
## 安装 — 任意方式,任意平台 ``` pip install "git+https://github.com/cognis-digital/cspm.git" # pip (works today) pipx install "git+https://github.com/cognis-digital/cspm.git" # isolated CLI uv tool install "git+https://github.com/cognis-digital/cspm.git" # uv pip install cognis-cspm # PyPI (when published) docker run --rm ghcr.io/cognis-digital/cspm:latest --help # Docker brew install cognis-digital/tap/cspm # Homebrew tap curl -fsSL https://raw.githubusercontent.com/cognis-digital/cspm/main/install.sh | sh ``` | Linux | macOS | Windows | Docker | 云平台 | |---|---|---|---|---| | `scripts/setup-linux.sh` | `scripts/setup-macos.sh` | `scripts/setup-windows.ps1` | `docker run ghcr.io/cognis-digital/cspm` | [DEPLOY.md](docs/DEPLOY.md) (AWS/Azure/GCP/k8s) |
↑ 回到顶部
## 相关的 Cognis 工具 **探索完整套件 →** [🗂️ 全部 170+ 工具](https://github.com/cognis-digital/cognis-neural-suite) · [⭐ awesome-cognis](https://github.com/cognis-digital/awesome-cognis) · [🔗 cognis-sources](https://github.com/cognis-digital/cognis-sources) · [🤖 uncensored-fleet](https://github.com/cognis-digital/uncensored-fleet) · [🧠 engram](https://github.com/cognis-digital/engram)
↑ 回到顶部
## 互操作性 `{}` 与包含 300+ 工具的 Cognis 套件无缝组合 — 统一的 JSON 输入/输出以及共享的兼容 OpenAI 的 `/v1` 骨干网络。请参阅 **[INTEROP.md](INTEROP.md)** 以获取套件图谱、组合模式以及参考技术栈。 ## 许可证 在 **Cognis Open Collaboration License (COCL) v1.0** 下开源可见 — 免费用于个人、内部评估、研究和教育用途;**商业/生产环境使用需要许可证** (licensing@cognis.digital)。参见 [LICENSE](LICENSE)。
Cognis Digital · Cognis Neural Suite 中 170+ 工具之一 · 让明天在今天更美好
标签:CSPM, Python, TinkerPop, 云配置审计, 可视化界面, 安全合规, 数据可视化, 无后门, 无线安全, 日志审计, 网络代理, 请求拦截, 逆向工具