cognis-digital/itarcheck

GitHub: cognis-digital/itarcheck

一款用于扫描代码和文档中 ITAR/EAR 出口管制条款及 USML 类别的合规筛查工具,支持 CI/CD 集成与 AI agent 驱动。

Stars: 0 | Forks: 0

ITARCHECK # ITARCHECK ### 标记代码、数据表和文档中潜在的 ITAR/EAR 出口管制条款及 USML 类别。 [![PyPI](https://img.shields.io/pypi/v/cognis-itarcheck.svg?color=6b46c1)](https://pypi.org/project/cognis-itarcheck/) [![CI](https://static.pigsec.cn/wp-content/uploads/repos/cas/99/993938d8ce5e902ccfb9d6747725c320d855dea3235ed9a304cedf0d94c9321f.svg)](https://github.com/cognis-digital/itarcheck/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-itarcheck itarcheck scan . # → prioritized findings in seconds ``` ## 🔎 示例输出 工具的真实、可复现输出 —— 离线运行: ``` $ itarcheck-emit --version itarcheck 0.1.0 ``` ``` $ itarcheck-emit --help usage: itarcheck [-h] [--version] {scan,categories} ... Flag potential ITAR/EAR export-controlled terms and USML categories in code, datasheets, and docs (compliance screening). positional arguments: {scan,categories} scan scan a file or directory for control indicators categories list USML categories used for classification options: -h, --help show this help message and exit --version show program's version number and exit ``` **示例结果格式** _(仅为说明用的数值 —— 请在您自己的数据上运行以获取真实结果):_ ``` { "findings": [ { "id": "1234567890", "title": "Suspicious Network Traffic", "description": "Potential malicious activity detected on port 443.", "categories": ["Network", "Security"], "created_at": "2023-02-20T14:30:00Z" }, { "id": "2345678901", "title": "Unusual System Logins", "description": "Multiple failed login attempts from unknown IP addresses.", "categories": ["System", "Security"], "created_at": "2023-02-20T14:35:00Z" } ] } ``` ## 用法 —— 分步说明 1. **安装**筛查工具: pip install cognis-itarcheck 2. **扫描代码、数据表或文档**,查找 ITAR/EAR 出口管制指标及 USML 类别: itarcheck scan ./design-docs --fail-on high 3. **输出 JSON**(包含用于 pipeline 的 `gate_failed` 和 `fail_on`),并使用可重复的 `--ext` 添加额外扩展名: itarcheck scan ./hdl --ext .vhd --format json | jq '.gate_failed' 4. **列出**引擎映射的 USML 类别(22 CFR 121.1): itarcheck categories 5. **拦截构建。** 当结果达到或超过 `--fail-on` 时退出并返回 `1`,否则返回 `0`。这是一种筛查辅助工具,而非法律裁定: itarcheck scan ./src --fail-on medium || echo 'review with an empowered official' ## 目录 - [为什么选择 itarcheck?](#why) · [功能](#features) · [快速开始](#quick-start) · [示例](#example) · [架构](#architecture) · [AI 技术栈](#ai-stack) · [对比](#how-it-compares) · [集成](#integrations) · [随处安装](#install-anywhere) · [相关项目](#related) · [贡献](#contributing) ## 为什么选择 itarcheck? 标记代码、数据表和文档中潜在的 ITAR/EAR 出口管制条款及 USML 类别 —— 而无需搭建重型基础设施。 `itarcheck` 是单一用途、可脚本化且可自托管的:将其指向目标,即可使用您工作流中已有的格式(table · JSON · SARIF)获取优先排序的结果,以此为 CI 设置拦截门控,并允许 agent 通过 MCP 驱动它。
↑ 返回顶部
## 功能 - ✅ 扫描文本 - ✅ 扫描路径 - ✅ 摘要总结 - ✅ 超出阈值 - ✅ 可在 Linux/macOS/Windows · Docker · devcontainer 上运行 - ✅ 提供 Python、JavaScript、Go 和 Rust 版本(`ports/`)
↑ 返回顶部
## 快速开始 ``` pip install cognis-itarcheck itarcheck --version itarcheck scan . # scan current project itarcheck scan . --format json # machine-readable itarcheck scan . --fail-on high # CI gate (non-zero exit) ```
↑ 返回顶部
## 示例 ``` $ itarcheck scan . [HIGH ] ITA-001 example finding (./src/app.py) [MEDIUM ] ITA-002 another signal (./config.yaml) 2 findings · risk score 5 · 38ms ```
↑ 返回顶部
## 架构 ``` flowchart LR IN[capture / scan] --> P[itarcheck
parse + map] P --> OUT[report] ```
↑ 返回顶部
## 从任何 AI 技术栈中使用 `itarcheck` 可与所有流行的 AI 使用方式互操作: - **MCP server** — `itarcheck mcp` (Claude Desktop, Cursor, Cognis.Studio, [uncensored-fleet](https://github.com/cognis-digital/uncensored-fleet)) - **OpenAI-compatible / JSON** — 通过管道将 `itarcheck scan . --format json` 传给任何 agent 或 LLM - **LangChain · CrewAI · AutoGen · LlamaIndex** — 一行代码即可将 CLI/JSON 封装为工具 - **CI / 脚本** — 为非 AI pipeline 提供 exit code + SARIF
↑ 返回顶部
## 对比 | | **Cognis itarcheck** | 典型工具 | |---|:---:|:---:| | 可自托管,无需账户 | ✅ | 视情况而定 | | 单一命令,零配置 | ✅ | ⚠️ | | 用于 CI 的 JSON + SARIF | ✅ | 视情况而定 | | MCP 原生 (AI agent) | ✅ | ❌ | | 多语言移植版本 (JS/Go/Rust) | ✅ | ❌ | | 开源许可证 | ✅ COCL | 视情况而定 |
↑ 返回顶部
## 集成 可通过管道融入您的技术栈:用于代码扫描的 **SARIF**,用于任何场景的 **JSON**,用于 AI agent 的 **MCP server**(`itarcheck mcp`),以及用于 SIEM/Slack/Jira 的 webhook 转发器。详见 [`docs/INTEGRATIONS.md`](docs/INTEGRATIONS.md)。
↑ 返回顶部
## 安装 —— 各种方式,各个平台 ``` pip install "git+https://github.com/cognis-digital/itarcheck.git" # pip (works today) pipx install "git+https://github.com/cognis-digital/itarcheck.git" # isolated CLI uv tool install "git+https://github.com/cognis-digital/itarcheck.git" # uv pip install cognis-itarcheck # PyPI (when published) docker run --rm ghcr.io/cognis-digital/itarcheck:latest --help # Docker brew install cognis-digital/tap/itarcheck # Homebrew tap curl -fsSL https://raw.githubusercontent.com/cognis-digital/itarcheck/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/itarcheck` | [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+ 工具之一 · Making Tomorrow Better Today
标签:SOC Prime, 云安全监控, 出口管制, 开发工具, 文档扫描, 请求拦截, 逆向工具, 静态分析