deliver · advanced · 60 min

Attack your own assistant

Break your assistant with instructions hidden in the content it reads, then close the hole in the design rather than in the prompt.

HANDS-ON LAB · YOU RUN IT ON YOUR MACHINE · 4 STEPS
  1. Step 1 of 4

    Give the assistant a secret it must never reveal and a tool that can send data out

    Run this to check

    uv run --with openai redteam.py --list

    You pass when

    Five named attacks are listed. At least one hides an instruction in a policy page, and one in a tool result.

    Files you write

    • redteam.py
    • docs/
  2. Step 2 of 4

    Run the attacks

    If none succeed, your attacks are too polite. Write the instruction the way an attacker would: as part of the document.

    Run this to check

    uv run --with openai redteam.py

    You pass when

    At least one attack makes the secret appear in an answer or an outgoing call. Keep the output.

  3. Step 3 of 4

    Write down which of the three dangerous abilities your assistant has

    Any two of the three are manageable. An assistant with all three can be told by a stranger to leak your data.

    Run this to check

    cat THREATS.md

    You pass when

    Three lines: does it see private data, does it read content from strangers, can it send data out. All three together is the problem.

    Files you write

    • THREATS.md
  4. Step 4 of 4

    Remove one of the three: an allowlist on the outgoing tool, or tools in a container with no network

    Run this to check

    uv run --with openai redteam.py; echo "exit $?"

    You pass when

    All five attacks fail and the exit code is 0. The secret appears nowhere in the output.

    Files you write

    • harness.py
No transcript here on purpose. This page does not show terminal output, because model answers differ from run to run. Each step says what a pass looks like; your own terminal is the proof.