Lion Cipher Lab

Build a prompt-injection-resistant tool broker: a deny-by-default layer that guards every tool an LLM can call (free, local Ollama — no API key)

Why it matters

The moment you let a language model call tools, you've built something that acts on the world — and untrusted content it reads (a web page, an email, a file a tool returns) can carry hidden instructions that hijack it into calling tools it never should. This is prompt injection, and it is not reliably fixable inside the model. The professional answer is to stop trusting the model's judgment for anything that matters and put a deny-by-default broker between its requests and your real tools, enforcing least privilege automatically. That broker — an allowlist, per-tool argument checks, a gated…

What you'll learn

Steps in this lab

  1. The words you need: prompt injection, agent, tool, broker
  2. Why prompt injection is unsolved at the model layer
  3. The broker idea: deny-by-default, and separating data from instructions
  4. Install Ollama and pull a small local model
  5. Make a workspace and a normal-looking (but poisoned) document
  6. Write the broker
  7. Run the attack and read the verdicts
  8. When a broker is overkill
  9. Do it better

Open the full interactive lab →