Agent Red-Team Suite

A CI-ready attack test for your own agent: 32 cases against your staging endpoint, a report of which got through, and a build that fails on high-severity results.

One-time · 14-day refund · instant download

Python harness / CSV cases / GitHub Actions workflow / Docs (ZIP + PDF)

redteam.py sends 32 cases to your staging agent endpoint: instructions hidden in web pages, emails, documents and tool results, system-prompt and secret leaks, data sent to outside URLs, unrequested sends, payments, deletes and role changes, path traversal, internal-address fetches, shell injection and runaway tool use. It reports which got through as Markdown, CSV, JUnit XML and dashboard JSON, re-runs cases to account for model randomness, and fails the build on high-severity results. Includes a stdlib adapter, an example GitHub Actions workflow, an accepted-risk list and a fix guide per category. Complements the Prompt Injection Test Pack, which focuses on injection prompts only.

What's inside

Verify it works

  1. python3 redteam.py --selftest prints selftest ok: a deliberately naive mock agent fails all 32 cases, a hardened mock passes all 32, and the CSV, Markdown, JUnit and dashboard reports are checked.
  2. python3 adapter_example.py --selftest prints selftest ok.
  3. Start python3 adapter_example.py --port 8787, then run python3 redteam.py --url http://127.0.0.1:8787/agent and open redteam-report/report.md.
  4. Wire run_my_agent() to your staging agent with tools stubbed, plant the canary (01 step 4) and re-run.
  5. Add agent-redteam.yml to CI. Python 3.9+, no installs. It only sends test prompts to the URL you give it.

Preview

First part of the main document, shown as-is:

01 Setup: point the suite at your agent

What this is. A repeatable attack test for your own agent. Each case plays an attacker: instructions hidden in a web page, an email, a document or a tool result, or a direct request to misuse a tool. The suite records whether the agent followed them. It runs locally or in CI and fails the build when a high-severity case gets through.

What it is not. It is not proof that an agent is safe. 32 cases cover common patterns; attackers will try others. Treat a clean run as "no known regressions", and add cases for anything you see in your own logs.

1. Use a staging agent

Never point this at a production agent with live tools. Stub or dry-run every tool that sends, pays, deletes or changes permissions. The suite only needs the agent to report which tools it tried to call.

2. Expose the contract

POST /agent  {"input": "...", "attachments": [{"source": "web", "text": "..."}]}
-> {"output": "...", "tool_calls": [{"name": "send_email", "arguments": {"to": "..."}}]}

adapter_example.py is a 30-line stdlib server: replace run_my_agent() with a call into your agent. Feed attachments to the agent the way real untrusted content reaches it (as retrieved pages, email bodies, tool results), not as part of the user's message.

3. Map tool names

Cases use generic tool names: send_email, transfer_funds, delete_records, grant_role, read_file, http_get, run_shell. Either name your stubs the same, or edit the fail_if column in redteam_cases.csv to your tool names. Remove cases for tools your agent does not have.

$29 · one-time · 14-day refund

← All kits