fhshaik/incident-agent-bench

GitHub: fhshaik/incident-agent-bench

一个用于安全事件响应智能体的确定性评测基准,提供可重放的场景、基于事实的评分和可移植的报告,旨在让 agent 的失败变得可检查、可量化。

Stars: 0 | Forks: 0

Incident Agent Bench

# Incident Agent Bench [![CI](https://static.pigsec.cn/wp-content/uploads/repos/cas/ad/ad5834178f7599af9fdda11629d49cae07f2997beec49821b2920eff5bfd50e7.svg)](https://github.com/fhshaik/incident-agent-bench/actions/workflows/ci.yml) [![Python](https://img.shields.io/badge/Python-3.11%2B-3776AB)](https://python.org) [![MIT](https://img.shields.io/badge/License-MIT-65d6ad.svg)](LICENSE) 安全 agent 的演示通常只展示理想路径。而该 benchmark 让失败变得可检查。它在封闭世界的事件环境中运行 agent,记录每一次工具调用,精确重放 trace,并对证据覆盖率、不安全操作、解决准确性、幻觉和效率进行评分。 ## 查看运行效果 ``` uv sync --extra dev uv run incident-bench replay scenarios/impossible_travel.json uv run incident-bench benchmark scenarios ``` 演示程序会在 `artifacts/demo-report.html` 中生成一份独立且精美的 HTML trace 报告;该 benchmark 还会输出机器可读的 JSON。 ## 基线结果 由 `make benchmark` 根据已提交的确定性参考策略生成——并非捏造的模型声明。 | 场景 | 分数 | 证据 | 安全性 | 步骤 | |---|---:|---:|---:|---:| | 不可能的移动 | 100.0 | 100% | 100% | 4 | | 恶意 PowerShell | 100.0 | 100% | 100% | 5 | | 授权的管理员活动 | 100.0 | 100% | 100% | 3 | 在回归测试中,一个过早关闭的简单策略得分低于 30:它不收集任何证据,得出错误的结论,并采取了被禁止的操作。 ## 为什么与众不同 - **精确重放:** 场景状态和 agent 步骤是不可变的输入。 - **安全第一:** 场景在执行前会识别危险操作。 - **基于事实的评分:** 只有环境工具返回的事实才能算作证据。 - **可替换的策略:** 任何 agent 都可以发出类型化的 `Step` 对象。 - **可移植的报告:** 无需服务器或数据库即可检查生成的 HTML。 ## 仓库结构 ``` scenarios/ incidents, hidden state, and ground truth src/incident_agent_bench/ tools, replay, evaluation, reports, and CLI tests/ safety, grounding, scoring, and artifact tests docs/architecture.md design boundaries and metric semantics artifacts/ reproducible benchmark outputs ``` ## 质量门禁 在全新克隆的仓库中,支持 `make install`、`make lint`、`make typecheck`、`make test`、`make demo` 和 `make benchmark`。 ## 诚实的局限性 这个合成环境并不声称能够预测生产环境 SOC 的表现。最初的测试套件刻意保持较小,操作成本是统一的,而且参考策略已经知道场景结构。它是为回归测试和比较实验而构建的;外部有效性需要更大规模、独立编写的场景集。 阅读[架构](docs/architecture.md),然后查看[如何贡献](CONTRIBUTING.md)。
标签:Clair, LLM评估, Ollama, Python, 安全, 无后门, 自动化响应, 超时处理