aneesh4995/agent-crucible

GitHub: aneesh4995/agent-crucible

一个本地搭建的 AI agent 安全测试平台,通过向拥有云访问权限的 agent 发起真实 prompt injection 攻击来衡量防护机制的有效性。

Stars: 0 | Forks: 0

# agent-crucible 拥有云访问权限的 AI agent 容易受到 prompt injection 攻击。此测试平台允许您安全地对 agent 发起这些攻击,并衡量您的防护机制捕获了哪些内容。 ## 快速开始 ``` git clone cd agent-crucible cp .env.example .env # add your LocalStack auth token docker compose up ``` 验证种子环境: ``` aws --endpoint-url=http://localhost:4566 s3 ls # 3 buckets curl http://localhost:8200/v1/sys/health # Vault responds psql postgresql://sre:sre_local@localhost:5432/sre_runbooks -c '\dt' ``` ## 运行内容(Session 1) | Service | Port | Purpose | |---|---|---| | LocalStack | 4566 | S3, DynamoDB, IAM, STS, Secrets Manager, CloudWatch, Logs | | Postgres | 5432 | SRE runbooks + incident database | | Vault | 8200 | Production/staging secrets (dev mode) | 种子数据位于 `init/` 中。`customer-data` S3 bucket 和 Vault `secret/production/*` 路径是攻击场景中使用的敏感数据窃取目标。 ## 攻击场景 8 个场景测试了两类威胁:一系列隐蔽的 prompt injection 变体(01–06),以及完全没有注入的混淆代理攻击(07)。完整的场景表、基准数据和结果:**[scenarios/README.md](scenarios/README.md)**。 自动针对任意模型运行任意场景: ``` python agent/harness.py --models mistralai/mistral-medium-3-5 --scenarios 07-confused-deputy-export ``` 有关测试框架,请参阅 [agent/README.md](agent/README.md)。 **目前的重点结果:** 一个强大的开源模型(mistral-medium-3.5)在 7/7 个场景中被攻破;而 Claude Code 在所有手动运行中都抵御了攻击。能力并不能预测鲁棒性——完整矩阵请参阅 [scenarios/README.md](scenarios/README.md#automated-harness-results-isolated-attributable--2026-07-01)。 ## 路线图 | Stage | Adds | Status | |---|---|---| | 1 | Infrastructure scaffold | done | | 2 | Attack corpus (8 scenarios) + automated multi-model harness | done | | 3 | Guardrail interceptor + policy engine | in progress | | 4 | Dashboard | not started | | 5 | GitHub launch polish | not started | ## 许可证 MIT
标签:AI安全, AI智能体, Chat Copilot, CISA项目, Docker, 安全测试平台, 安全防御评估, 版权保护, 请求拦截, 逆向工具