Lion Cipher Lab

Use an LLM to review code for vulnerabilities — then MEASURE its false-positive rate (so you know when to trust it)

Why it matters

An LLM is a fluent, confident, tireless source of security findings — and a chunk of them are wrong. Ship its raw output as 'findings' and you flood a triage queue with false positives, burn an engineer's afternoon chasing ghosts, and torch your own credibility. The professional move is not to trust the model or dismiss it — it is to MEASURE it against known-answer code before you rely on it, so 'we can trust it here' is a number you can show, not a feeling. That single habit — measure the tool, then decide where it belongs — is what separates an analyst who uses AI well from one who gets…

What you'll learn

Steps in this lab

  1. Why you MEASURE the model instead of trusting it
  2. Define 'real' with CWE, then build a small LABELED corpus
  3. Install Ollama and pull a local model (no API key, ever)
  4. Force the model into a STRUCTURED verdict (so you can score it)
  5. Score it: confusion matrix, precision, recall, false-positive rate
  6. Baseline: run a deterministic SAST tool (Semgrep) on the same files
  7. The judgment: when to trust it, and when not

Open the full interactive lab →