CobaltoSec/condor

GitHub: CobaltoSec/condor

一款针对智能体 AI 平台的自动化安全扫描器,覆盖 OWASP ASI Top 10 全部十类风险并支持十六种主流平台的检测与报告输出。

Stars: 0 | Forks: 0

# Condor **智能体 AI 安全扫描器 — OWASP ASI Top 10** [![CI](https://static.pigsec.cn/wp-content/uploads/repos/cas/ad/ad5834178f7599af9fdda11629d49cae07f2997beec49821b2920eff5bfd50e7.svg)](https://github.com/CobaltoSec/condor/actions/workflows/ci.yml) [![PyPI](https://img.shields.io/pypi/v/cobaltosec-condor)](https://pypi.org/project/cobaltosec-condor/) [![Python 3.11+](https://img.shields.io/pypi/pyversions/cobaltosec-condor)](https://pypi.org/project/cobaltosec-condor/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) Condor 扫描智能体 AI 平台,检测映射到 [OWASP 智能体应用 Top 10](https://owasp.org/www-project-top-10-for-agentic-applications/) 的安全漏洞。它能理解每个平台的语义——枚举 chatflow、tool、vectorstore 和 agent 攻击面——然后并行运行 10 个专用模块。 针对 Flowise 1.8.2 实例,Condor 在 **3.6 秒内发现了 9 个漏洞**——3 个 CRITICAL,5 个 HIGH,1 个 MEDIUM——全部确认为映射到已发布 GHSA 的真实漏洞。 ## 安装 ``` pip install cobaltosec-condor ``` ## 快速开始 ``` # 扫描 Flowise 实例 condor scan --url http://localhost:3000 --platform flowise # 用于管道的 JSON 输出 condor scan --url http://localhost:3000 --platform flowise --format json --stdout | jq '.findings[].severity' # 用于 GitHub Code Scanning 的 SARIF 输出 condor scan --url http://localhost:3000 --platform flowise --format sarif # 认证扫描 condor scan --url https://letta.internal --platform letta --api-key $LETTA_KEY # 从目标文件进行批量扫描 condor scan --targets targets.txt --platform generic --concurrency 10 --format json # 仅运行特定模块 condor scan --url http://localhost:3000 --platform flowise -m privilege-abuse -m code-execution ``` ## 模块 — 10 / 10 OWASP ASI | 模块 | ASI | 测试内容 | |--------|-----|---------------| | `goal-hijack` | ASI01 | Prompt injection、越狱、通过 tool 输出进行的间接注入 | | `tool-misuse` | ASI02 | 路径遍历、SSRF、SSTI、凭据暴露 | | `privilege-abuse` | ASI03 | 未经身份验证的 endpoint、IDOR、header 绕过 (CVE-2026-30820) | | `supply-chain` | ASI04 | 通过 OSV.dev 进行 CVE 检测、恶意的 tool 描述 | | `code-execution` | ASI05 | eval/exec 注入点、未经身份验证的 RCE endpoint | | `memory-poisoning` | ASI06 | 未经身份验证的 vectorstore 访问、对抗性注入 | | `inter-agent` | ASI07 | agent 间通道、来源伪造 | | `cascading-failures` | ASI08 | 速率限制绕过、任务队列暴露 | | `trust-exploitation` | ASI09 | System prompt 暴露、AI 身份泄露 | | `rogue-agents` | ASI10 | 未经身份验证的 agent/tool 创建、webhook 注册 | ## 支持的平台 — 16 | 平台 | `--platform` | 备注 | |----------|-------------|-------| | Flowise | `flowise` | chatflow、tool、vectorstore、apikey endpoint | | Langflow | `langflow` | flow、自定义组件执行 | | Dify | `dify` | app、数据集、system prompt 修改 | | AutoGen Studio | `autogen` | tool/execute RCE 攻击面 | | n8n | `n8n` | workflow、凭据 endpoint | | LlamaIndex | `llamaindex` | FastAPI agent 服务器 | | CrewAI | `crewai` | FastAPI 服务 | | LangGraph | `langgraph` | 线程、存储、运行 | | Ollama | `ollama` | 模型服务器、写入 endpoint | | OpenAI 兼容 | `openai-compat` | vLLM、LocalAI、LM Studio | | Open WebUI | `openwebui` | Python 函数/tool 创建(持久化 RCE 攻击面) | | Hayhooks | `hayhooks` | pipeline endpoint、OpenAPI 规范 | | Letta | `letta` | 每个 agent 的内存 IDOR、`/v1/tools/run` RCE (GHSA-p67m-xf4h-2r78) | | Qdrant | `qdrant` | 集合、快照 SSRF | | Chroma | `chroma` | 集合 v1/v2、未经身份验证的写入 | | 通用 HTTP | `generic` | OpenAPI/Swagger 自动解析、GraphQL 内省 | ## 输出格式 ``` --format table # Rich terminal table (default) --format json # Structured JSON --format sarif # SARIF 2.1.0 — GitHub Code Scanning / SAST tooling --format html # Self-contained HTML with dark mode and collapsible findings --format junit # JUnit XML — Jenkins, GitLab, CircleCI --format both # JSON + SARIF written simultaneously --stdout # Emit JSON to stdout for piping (suppresses progress bar) ``` ## 高级用法 ``` # 使用 baseline 抑制已知良好的发现 condor scan --url http://localhost:3000 --platform flowise --save-baseline baseline.json condor scan --url http://localhost:3000 --platform flowise --baseline baseline.json # 通过 Burp Suite 路由 condor scan --url http://localhost:3000 --platform flowise \ --proxy http://127.0.0.1:8080 --insecure # 仅报告 HIGH 及以上级别 condor scan --url http://localhost:3000 --platform flowise --min-severity high # 从 config 文件加载默认值 condor scan --config condor.yaml # 搭建新模块 condor scaffold --name my-check --asi 03 ``` ## GitHub Actions ``` - uses: CobaltoSec/condor/.github/actions/condor-scan@v1 with: url: ${{ env.STAGING_URL }} platform: flowise format: sarif fail-on: critical - uses: github/codeql-action/upload-sarif@v3 with: sarif_file: condor-results/report.sarif ``` ## 集成 ``` # Slack / Teams 通知 condor scan --url http://localhost:3000 --platform flowise \ --notify-slack $SLACK_WEBHOOK_URL # DefectDojo 导出 condor scan --url http://localhost:3000 --platform flowise \ --defectdojo-url https://defectdojo.internal \ --defectdojo-token $DD_TOKEN \ --defectdojo-product "AI Platform Audit" ``` ## 插件系统 第三方模块和平台适配器通过 `importlib.metadata` 入口点自动发现: ``` # 你的插件包的 pyproject.toml [project.entry-points."condor.modules"] my-check = "my_package.modules:MyCheckModule" [project.entry-points."condor.platforms"] my-platform = "my_package.platforms:MyPlatform" ``` ## 合规性 每个发现都包含对 ISO/IEC 42001、NIST AI RMF 和欧盟 AI 法案的引用。CWE ID 包含在 SARIF 输出中,以便与 SAST 工具集成。 ## 负责任的披露 Condor 发现的漏洞根据 [CobaltoSec 负责任的披露政策](https://github.com/CobaltoSec/disclosure-policy) 进行报告。在进行任何公开披露之前,会通过 GitHub Security Advisory 私下通知供应商。 ## 许可证 MIT © [CobaltoSec](https://cobalto-sec.tech)
标签:Agentic AI, AI安全, Chat Copilot, LNA, Python, 加密, 无后门, 无服务器架构, 漏洞扫描器, 聊天机器人, 自动化渗透测试, 调试插件, 逆向工具