Lion Cipher Lab

Build a detection-as-code pipeline: unit-test your Sigma rules and gate them in CI

Why it matters

Most detection content dies the same quiet death: someone writes a rule, pastes it into the SIEM, it looks reasonable, and then nobody ever proves it fires on the thing it is supposed to catch or STAYS QUIET on the everyday noise it is supposed to ignore. Six months later the log field got renamed, the rule matches nothing, and no alarm went off because 'no alerts' looks exactly like 'no attacks.' Detection-as-code is the fix the best SOCs adopted from software engineering: your detections live in a git repository, every change is reviewed, and a continuous-integration (CI) pipeline…

What you'll learn

Steps in this lab

  1. The idea: detections are code, so treat them like code
  2. Set up the workspace and install the tooling
  3. Write a real detection rule (and pin it in git)
  4. Machine check 1 — lint the rule with 'sigma check'
  5. Machine check 2 — convert the rule with 'sigma convert'
  6. The step everyone skips — fire-on-bad / quiet-on-good UNIT TESTS
  7. Prove the gate bites — break the rule two ways
  8. Wire it into CI — a GitHub Actions regression gate
  9. The judgment: what a green pipeline does and does NOT buy you
  10. What you built — and the reflex to keep

Open the full interactive lab →