Lion Cipher Lab

Contain cross-agent prompt-injection propagation in a multi-agent system: the confused-deputy attack that jumps agent to agent, measured and defended (free, offline — no API key)

Why it matters

Single-agent prompt-injection labs teach you to harden one model. Production AI is increasingly not one model — it is a crew: an orchestrator that plans, worker agents that specialize, and at least one agent whose whole job is to ingest untrusted external content (a retrieved document, a web page, a tool result, another tenant's ticket). That architecture creates a failure mode that does not exist in the single-agent world: PROPAGATION. An attacker plants an instruction inside the untrusted content; the reader agent — doing exactly what it was told, summarize this — folds that text into an…

What you'll learn

Steps in this lab

  1. The words first: multi-agent system, confused deputy, prompt injection, ASR
  2. Set up: Python 3.10+, offline, no key
  3. Build the whole system in one file (vulnerable baseline + four defenses)
  4. Run it and read the ASR table
  5. Layer 1 — capability-scoping: give the reader nothing dangerous to misuse
  6. Layer 2 — provenance / trust-tagging: untrusted content is DATA, never instructions
  7. Layer 3 — plan-then-execute (the dual-LLM / CaMeL pattern)
  8. Layer 4 — deny-by-default output validation
  9. The load-bearing lesson: architecture is the control, not a polite request

Open the full interactive lab →