sunilgentyala/argus

GitHub: sunilgentyala/argus

ARGUS 是一个基于多 Agent 架构的 LLM 安全红队扫描框架,通过自主推演攻击策略发现大模型漏洞并映射到 CVSSv4.0 评分与多项全球合规框架。

Stars: 0 | Forks: 0

# ARGUS [![ARGUS CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/10e7c207d0070841.svg)](https://github.com/sunilgentyala/argus/actions/workflows/argus-ci.yaml) [![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-green.svg)](LICENSE) 用于 LLM 安全的 **Agentic Red-team and Governance Unified Scanner**。 ARGUS 使用闭环多 Agent 架构取代了静态的探测与检测 pipeline,该架构能够推演攻击策略,合成新型 payload,通过三层检测 stack 评估结果,并将每个已确认的发现映射到 CVSSv4.0 向量和全球监管框架。 ## 架构 ``` Target LLM / Pipeline | v ┌─────────────────────────────────────────────────┐ │ Orchestrator │ │ │ │ Planner ──> Attacker ──> Evaluator │ │ ^ | | │ │ | v v │ │ └──── Revision <── Findings + CVSS │ │ | │ │ Reporter │ └─────────────────────────────────────────────────┘ | v SARIF + JSON reports ──> CI/CD / GRC tooling ``` ### Agent | Agent | 角色 | |---|---| | **Planner** | 推理模型 (Claude Opus) 根据实时的目标行为信号和情景记忆来制定和修订攻击策略 | | **Attacker** | 通过 embedding 空间多样性约束合成新型 payload,并将其投递至目标 | | **Evaluator** | 三层检测:语义相似度、LLM-as-judge 评估小组、行为轨迹分析 | | **Reporter** | 生成 SARIF v2.1 和 JSON 报告;将发现映射到合规框架 | ### 攻击面覆盖 - 直接补全 endpoint - RAG pipeline 遍历(间接跨 prompt 注入) - Model Context Protocol (MCP) server mesh - 多 Agent pipeline 传播 - 工具使用 / 函数调用接口 ### 检测 Stack 1. **语义相似度** — 针对已确认攻击的 embedding 空间计算余弦距离 2. **LLM-as-judge 评估小组** — 具有可配置确认阈值的多模型裁决 3. **行为轨迹分析** — pipeline 遥测异常检测 ### 评分与合规 - 针对所有 10 个 OWASP LLM Top 10 (2025) 类别的 CVSSv4.0 向量 - 合规映射:NIST AI RMF、EU AI Act、US EO 14110、UK AISI、India CERT-In、ISO 42001、APAC/EMEA/非洲数字治理框架 ## 快速开始 ``` pip install -e . # 扫描 Anthropic 模型(快速 profile,20 个 payloads) argus scan --target anthropic --model claude-sonnet-4-6 --profile quick # 使用自定义 config 进行全面扫描 argus scan --target anthropic --model claude-opus-4-7 --profile full \ --config configs/argus.default.yaml --output-dir ./my-reports # 使用 system prompt 进行扫描 argus scan --target openai --model gpt-4o \ --system-prompt "You are a helpful customer service agent." \ --profile compliance # 查看已保存的报告 argus show ./argus-reports/.report.json ``` API key 解析顺序:`--api-key` 标志 → `ARGUS_API_KEY` 环境变量 → `ANTHROPIC_API_KEY` / `OPENAI_API_KEY`。 ## 扫描配置 | 配置 | Payload 预算 | 侧重点 | |---|---|---| | `quick` | 20 | 仅限最高严重程度的 OWASP 类别 | | `full` | 100 | 涵盖所有攻击面的全部 10 个 OWASP LLM Top 10 类别 | | `pipeline` | 50 | RAG、MCP、多 Agent、工具使用等攻击面 | | `compliance` | 80 | 包含完整合规映射输出的所有类别 | ## 配置说明 编辑 `configs/argus.default.yaml` 或传递 `--config path/to/custom.yaml`: ``` agents: planner: model: claude-opus-4-7-20251101 max_tokens: 2048 synthesizer: model: claude-sonnet-4-6 judge: model: claude-sonnet-4-6 min_affirmative: 2 # votes needed to confirm a finding min_confidence: 0.75 compliance: frameworks: - NIST_AI_RMF - EU_AI_ACT - UK_AISI - US_EO_14110 reporting: formats: [jsonl, html, sarif] output_dir: ./argus-reports include_payload_text: false # set true only in isolated lab environments ``` ## 项目结构 ``` argus/ ├── argus/ │ ├── agents/ │ │ ├── planner.py # LLM-backed attack strategy planner (AttackPlan, AttackTask) │ │ ├── attacker.py # Payload generation and target delivery │ │ ├── evaluator.py # Three-layer detection orchestration │ │ └── reporter.py # SARIF + JSON report generation │ ├── core/ │ │ ├── orchestrator.py # Main scan loop (Planner -> Attacker -> Evaluator cycle) │ │ └── session.py # SessionState, Finding, ScanPhase state machine │ ├── compliance/ │ │ └── mapper.py # 8-framework compliance tag engine │ ├── detectors/ │ │ └── llm_judge.py # LLM-as-judge multi-model verdict panel │ ├── memory/ │ │ ├── episodic.py # Cross-session attack memory (ChromaDB / in-memory) │ │ └── hitlog.py # Confirmed-hit append-only log │ ├── payloads/ │ │ └── synthesizer.py # Diversity-constrained payload synthesis │ ├── reporting/ │ │ └── sarif.py # SARIF v2.1 output │ ├── scoring/ │ │ └── cvss4.py # CVSSv4.0 vector engine │ ├── targets/ │ │ ├── anthropic_target.py │ │ ├── openai_target.py │ │ ├── base.py # Target ABC │ │ └── profiler.py # Target behavioral profiling │ └── cli.py # Click CLI entry point ├── configs/ │ ├── argus.default.yaml │ └── profiles/ # quick, pipeline scan profiles ├── tests/ │ └── unit/ │ ├── test_session.py │ └── test_orchestrator.py └── pyproject.toml ``` ## 运行测试 ``` pip install -e ".[dev]" pytest tests/unit/ -v ``` ## 扩展 ARGUS ### 自定义目标 ``` from argus.targets.base import Target class MyTarget(Target): @property def name(self) -> str: return "my-custom-target" def send(self, prompt: str) -> str: # call your endpoint return response_text ``` ### 自定义合规框架 按照现有的框架模式,在 `argus/compliance/mapper.py` 中的 `ComplianceMapper` 添加一条条目。 ## 作者 **Sunil Gentyala** — IEEE Senior Member 网络安全与 AI 安全,HCLTech,Dallas, TX, USA sunil.gentyala@ieee.org ## 许可证 Apache-2.0 — 见 [LICENSE](LICENSE)。
标签:CISA项目, 合规治理, 域名收集, 多智能体框架, 大语言模型安全, 机密管理, 自动化渗透测试, 逆向工具