Lion Cipher Lab

Run a prompt-injection regression suite in CI with Inspect and fail the build when the defence slips

Why it matters

A system prompt that says never reveal this is a hope, not a control. Models change, prompts get edited, and a defence that held last month can quietly stop holding. OWASP's guidance on prompt injection includes regular adversarial testing and attack simulations, and the practical form of that for a small team is a test that runs on every change and fails the build when the defence slips. This lab builds the smallest honest version: ten benign extraction attempts, a secret that can be detected, a pass rate, and a gate.

What you'll learn

Steps in this lab

  1. A defence you do not test is a hope
  2. Set up Inspect and a local model
  3. Write the suite: a canary, ten attacks and a scorer
  4. Run it and read the result
  5. Turn the pass rate into a gate
  6. Strengthen the prompt and watch the number move
  7. Put it in CI
  8. What a green build does and does not mean
  9. Clean up

Open the full interactive lab →

Keep learning