cognis-digital/sbomgate

GitHub: cognis-digital/sbomgate

SBOMGATE 是一款支持自托管的 SBOM 差异对比与漏洞监控工具,通过追踪依赖组件和维护者变更来保障软件供应链安全。

Stars: 0 | Forks: 0

SBOMGATE # SBOMGATE ### 持续的 SBOM 差异与漏洞监控,附带维护者变更追踪 [![PyPI](https://img.shields.io/pypi/v/cognis-sbomgate.svg?color=6b46c1)](https://pypi.org/project/cognis-sbomgate/) [![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/d6cbf2b47e181350.svg)](https://github.com/cognis-digital/sbomgate/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) *蓝队 / 防御 —— 为小型团队提供的检测、欺骗和监控。*
``` pip install cognis-sbomgate sbomgate scan . # → prioritized findings in seconds ``` ## 目录 - [为什么选择 sbomgate?](#why) · [功能](#features) · [快速开始](#quick-start) · [示例](#example) · [架构](#architecture) · [AI stack](#ai-stack) · [对比](#how-it-compares) · [集成](#integrations) · [随处安装](#install-anywhere) · [相关项目](#related) · [贡献](#contributing) ## 用法 —— 分步指南 `sbomgate` 对两个 SBOM 进行差异对比和/或将 SBOM 与本地安全公告源进行匹配,然后执行拦截(gate)。当检测结果达到或超过 `--fail-on` 设定的阈值(默认为 `high`)时,退出码为 `1`。 1. **安装** pip install sbomgate 2. **扫描当前 SBOM**,与先前的 SBOM 和本地安全公告源进行比对: sbomgate scan new-sbom.json --old old-sbom.json --advisories advisories.json 3. **运行专注的子命令** —— 对两个 SBOM 执行 `diff`,或对单个 SBOM 执行 `vulns` 匹配: sbomgate diff old-sbom.json new-sbom.json sbomgate vulns new-sbom.json advisories.json 4. **读取 JSON 输出**,并使用 `--fail-on {critical,high,medium,low}` 调整拦截阈值: sbomgate scan new-sbom.json --advisories advisories.json --format json | jq '.gate' 5. **在 CI 中使用** —— 当漏洞或风险变更超过阈值时中断构建: sbomgate scan new-sbom.json --old old-sbom.json --advisories advisories.json \ --fail-on high || exit 1 ## 为什么选择 sbomgate? 提供持续的 SBOM 差异与漏洞监控,并附带维护者变更追踪 —— 无需搭建笨重的基础设施。 `sbomgate` 是单一用途、可脚本化且支持自托管的:将其指向目标,即可获得符合您现有工作流格式的优先级排序结果(table · JSON · SARIF),据此对 CI 进行拦截,并允许 agent 通过 MCP 驱动它。
↑ 返回顶部
## 功能 - ✅ 解析 Sbom - ✅ 加载 Sbom - ✅ Sbom 差异对比 - ✅ 加载安全公告 - ✅ 匹配漏洞 - ✅ 拦截 - ✅ 运行于 Linux/macOS/Windows · Docker · devcontainer - ✅ 支持 Python, JavaScript, Go 和 Rust 的多语言端口 (`ports/`)
↑ 返回顶部
## 快速开始 ``` pip install cognis-sbomgate sbomgate --version sbomgate scan . # scan current project sbomgate scan . --format json # machine-readable sbomgate scan . --fail-on high # CI gate (non-zero exit) ```
↑ 返回顶部
## 示例 ``` $ sbomgate scan . [HIGH ] SBO-001 example finding (./src/app.py) [MEDIUM ] SBO-002 another signal (./config.yaml) 2 findings · risk score 5 · 38ms ```
↑ 返回顶部
## 架构 ``` flowchart LR IN[target / manifest] --> P[sbomgate
checks + rules] P --> OUT[findings (JSON / SARIF)] ```
↑ 返回顶部
## 从任何 AI stack 中使用它 `sbomgate` 可以与所有流行的 AI 使用方式互操作: - **MCP server** —— `sbomgate mcp` (Claude Desktop, Cursor, Cognis.Studio, [uncensored-fleet](https://github.com/cognis-digital/uncensored-fleet)) - **兼容 OpenAI / JSON** —— 将 `sbomgate scan . --format json` 的输出通过管道传递给任何 agent 或 LLM - **LangChain · CrewAI · AutoGen · LlamaIndex** —— 一行代码即可将 CLI/JSON 封装为工具 - **CI / 脚本** —— 为非 AI pipeline 提供 exit code + SARIF
↑ 返回顶部
## 对比 | | **Cognis sbomgate** | anchore | |---|:---:|:---:| | 可自托管,无需账号 | ✅ | 视情况而定 | | 单一命令,零配置 | ✅ | ⚠️ | | 用于 CI 的 JSON + SARIF | ✅ | 视情况而定 | | 原生 MCP (AI agents) | ✅ | ❌ | | 多语言端口 (JS/Go/Rust) | ✅ | ❌ | | 开源协议 | ✅ COCL | 视情况而定 | *秉承 **anchore/syft** 的精神,以 Cognis 的方式重新构建。遗漏了致谢?欢迎提交 PR。*
↑ 返回顶部
## 集成 可无缝接入您的技术栈:用于代码扫描的 **SARIF**,适用于任何场景的 **JSON**,用于 AI agents 的 **MCP server** (`sbomgate mcp`),以及用于 SIEM/Slack/Jira 的 webhook 转发器。请参阅 [`docs/INTEGRATIONS.md`](docs/INTEGRATIONS.md)。
↑ 返回顶部
## 安装 —— 任何方式,任何平台 ``` pip install "git+https://github.com/cognis-digital/sbomgate.git" # pip (works today) pipx install "git+https://github.com/cognis-digital/sbomgate.git" # isolated CLI uv tool install "git+https://github.com/cognis-digital/sbomgate.git" # uv pip install cognis-sbomgate # PyPI (when published) docker run --rm ghcr.io/cognis-digital/sbomgate:latest --help # Docker brew install cognis-digital/tap/sbomgate # Homebrew tap curl -fsSL https://raw.githubusercontent.com/cognis-digital/sbomgate/main/install.sh | sh ``` | Linux | macOS | Windows | Docker | Cloud | |---|---|---|---|---| | `scripts/setup-linux.sh` | `scripts/setup-macos.sh` | `scripts/setup-windows.ps1` | `docker run ghcr.io/cognis-digital/sbomgate` | [DEPLOY.md](docs/DEPLOY.md) (AWS/Azure/GCP/k8s) |
↑ 返回顶部
## 相关的 Cognis 工具 - [`sentrylog`](https://github.com/cognis-digital/sentrylog) —— 面向小型团队的单文件 SIEM —— Sigma 规则 + 多源摄取 - [`edrgap`](https://github.com/cognis-digital/edrgap) —— EDR 覆盖率和绕过检测器 —— 调和 MDM + EDR + AD 清单 - [`canarynet`](https://github.com/cognis-digital/canarynet) —— 自托管 canary token 网络 —— AWS 密钥、DNS、文档、web URL - [`phishforge`](https://github.com/cognis-digital/phishforge) —— 开源网络钓鱼模拟 —— 活动、模板、培训 - [`honeytrace`](https://github.com/cognis-digital/honeytrace) —— 主动诱饵网络诱捕系统 —— SSH、RDP、SMB、web honeypots **探索套件 →** [🗂️ 所有 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+ 工具之一 · Making Tomorrow Better Today
标签:DevSecOps, Python, SBOM, 上游代理, 可视化界面, 数据可视化, 文档安全, 无后门, 日志审计, 硬件无关, 请求拦截, 逆向工具