本页用于在本地开发环境启动 Attacker,并运行第一条不依赖外部 Target 的隔离评测。
>=3.12,<3.13
git clone https://github.com/juemimgcd/Attacker.git cd Attacker uv sync --locked --python 3.12 uv run alembic upgrade head
uv run uvicorn main:app --reload
默认入口:
内置 stateful profile 不需要连接外部 Target:
curl -X POST http://127.0.0.1:8000/runs/stateful \ -H "Content-Type: application/json" \ -d '{"profile":"hardened","dataset_path":"samples/stateful/phase3.yaml"}'
可用 profile:
vulnerable
hardened
regressed
拿到 run_id 后查询报告:
run_id
GET /runs/{run_id}/report.json GET /runs/{run_id}/report.md
复制 .env.example 为 .env,设置:
.env.example
.env
SECURITY__API_KEY=replace-with-a-long-random-secret
业务接口随后需要携带:
X-API-Key: replace-with-a-long-random-secret
/health、/docs 与 /openapi.json 保持公开。
/health
/docs
/openapi.json
There was an error while loading. Please reload this page.