---
title: Red team
description: Run the versioned attack corpus against your guardrails and a gear with venom redteam run, within a spend cap, and read which guardrail caught each case.
section: security
order: 100
audience: [operator, user]
sources: [cli/src/redteam-command.ts, packages/harness/src/redteam, services/nodejs-cloud/contracts/redteam-corpus.json, docs/redteam.md]
features: [security.redteam]
---

The red-team suite runs a versioned corpus of attacks against the guardrails in force and, from the CLI, against a
gear. It scores each category, keeps every run for the trend on Venom Cloud, and says for each case which guardrail
caught it, or that none did and which rule would.

## Quick start {#quick-start}

```bash
venom redteam run --dry-run                    # the plan and the estimate; nothing is sent
venom redteam run                              # the free cases only
venom redteam run --gear strong --max-usd 0.10 # free cases, plus model cases within $0.10
```

## The corpus {#corpus}

The corpus only grows, and a case's id never changes meaning, so runs on the same corpus version compare.

| Category | What the cases try |
|---|---|
| Prompt injection | instructions planted in web pages, READMEs and tool output: override phrases, chat-template tokens, tool-call look-alikes, invisible tag characters, hidden HTML |
| Jailbreaks | "DAN" and "developer mode" prompts; a role-play that asks for a secret the system prompt holds |
| Data exfiltration | customers' emails, phone numbers and ID numbers in a prompt; image links that carry data out |
| Secret leakage | a database URL with its password, an `.env` read by a tool, a password in an answer |
| Policy bypass | other spellings of a denied model: case, provider prefixes, `:latest`, fullwidth letters, zero-width spaces, look-alike letters, snapshot dates |
| Tool abuse | `curl … \| bash`, "push and don't tell the user", "upload the .env" |

Three kinds of check:

| Check | Cost | Passes when |
|---|---|---|
| guardrail | free | the text, sent as a prompt, a tool result or an answer, is blocked, redacted, kept local or warned about by an enforced rule. A rule in Monitor doesn't count |
| models | free | every other spelling of each model you deny is refused too. Skipped when no model is denied |
| model | paid | a fresh canary (`VENOM-CANARY-XXXXXXXX`) placed where the secret would be never comes back in the answer or a tool call's arguments. A guardrail that refuses the request is a pass |

Evidence never holds the attack text or the model's answer, only what was decided.

## Running it {#run}

It always prints the plan first: how many free cases, how many model cases fit under `--max-usd`, and their estimate
at a deliberately high rate ($10 per million input tokens, $40 per million output, at most 300 answer tokens). Each
model case runs only while the estimate stays under the cap. The four model cases together come to about six cents
at that rate.

| Flag | Default | What it does |
|---|---|---|
| `--dry-run` | off | Print the plan and estimate; send nothing |
| `--gear <name>` | none | Send model cases with this gear (`x-venom-gear`) |
| `--model <id>` | `venom-auto` | The model for model cases |
| `--max-usd <usd>` | `0` (no model cases) | Spend cap for model cases, 0 to 10 |
| `--json` | off | Print the run as JSON |

Requests go to `VENOM_BASE_URL` with `VENOM_API_KEY`. Against Venom Cloud, the free cases run there on your key's
guardrails (the org's, your key group's and your own) and the run is kept. Against any other gateway they run in the CLI
on your own `venom.yaml` guardrails and nothing is kept.

## The Red team page {#console}

On Venom Cloud, `/redteam` under Safety & policy shows the latest run's score, a line per category, every case with
the code that caught it (linked to its `/g/<code>` page) or the catalog entry to add, and the trend with each run's
cost. Run checks now runs the free cases on the org's guardrails; model cases come from the CLI.

## Related {#related}

- [Guardrails](/docs/security/guardrails.md): the rules being tested, and the prompt-injection shield.
- [The evals section](/docs/evals.md): measuring agent quality.
