Lion Cipher Lab

Find the commit that broke a security check with git bisect run

Why it matters

Security checks rarely break with a dramatic commit titled 'remove security.' They break in a tidy refactor that looks like an improvement, sixty commits ago, and nobody notices until a pentester or an attacker sends a link like //evil.example/login through your login redirect. When that happens, the first question in the incident is 'when did this break, and what else shipped with it?' git bisect answers it in a handful of test runs instead of an afternoon, and it does it mechanically, so it works even when you do not understand the code yet. Every developer, AppSec engineer and DevSecOps…

What you'll learn

Steps in this lab

  1. The idea: a regression, and why halving beats walking
  2. Open a terminal and confirm git and Python are installed
  3. Build the throwaway repo: 60 commits, one quiet break
  4. Meet the security test, and its three exit codes
  5. The slow way first: walk the history and count
  6. Bisect by hand: start, bad, good, and a skip
  7. Automate it: git bisect run, and measure
  8. Fix it, and keep the test so it never comes back
  9. Judgment: when bisect is the right tool, and where it fails

Open the full interactive lab →