AI Blue · Module 2 · The Craft

Detect: Detection Engineering as Code

The lesson treats B2 Detect as engineering. Participants learn the six elements of a detection record, the pipeline from requirement through test gate, staged rollout and rollback, the four recurring faults of AI-drafted detections, the four layers of test, the alert budget, the four rights needed over supplier detections and the five kinds of detection debt, using DET-HM-0455 and DET-NR-0001.

Lesson 6 of 28Chapter 690 minutes

Read the chapterThe whitepaperThe slides

All courses / AI Blue / Module 2 / Chapter 6

Learning objectives

After the lesson the participant can:

Key concepts

Detection record
The versioned definition of one detection, identified as DET-NR-NNNN or DET-HM-NNNN. It holds logic, data sources with a health check, an ATT&CK mapping, tests, ownership and cost, and origin.
Test gate
Automated checks on the pull request: a schema check, a logic check that every field exists in the data source's schema, and unit tests for positive and negative cases. It sits before human review.
Alert budget
The number of alerts per week the SOC agrees to take from a detection. The default for a new medium-severity detection is no more than six alerts a week for the whole SOC.
Shadow rollout
The first stage of rollout, in which a detection writes alerts to a log that no analyst reads, so that its volume and precision can be measured against real traffic before a pilot and full release.
Detection debt
The accumulated cost of detections that no longer do what they claim. Five kinds recur: stale, untested, noisy, blind and orphaned. The register that lists them is generated from the records, not kept by hand.

Interactive exercises

Do them here and get feedback at once. Choose a card and then where it belongs, or drag it.

Interactive exercise 1 · Sort

Four kinds of detection debt

Sort each observation about a detection into the kind of debt it shows, as the chapter defines the kinds.

Interactive exercise 2 · Put in order

A detection's path into production

Put the steps of the detection pipeline in the order the chapter gives, from the requirement to full rollout.

Teaching plan

15 minTeacher presentation of the detection record through DET-HM-0455: the fields that carry the discipline, including the silence check and the rollout and rollback criteria.
15 minGroups match the four recurring faults of drafts, ungrounded fields, overfitting to indicators, blindness to cost and tests that share the drafter's mistake, to steps of the review protocol.
15 minDiscussion of the four test layers and of Hansa Mutual's first-quarter figures: 48 drafts, 15 merged, acceptance rate 0.31, and the five measures of the drafter.
35 minExercise: participants take one supplier-default rule into a detection record, as Nordvik Region did with DET-NR-0001.
10 minDebrief on detection debt and on why the book does not use Level 4 Autonomous for detection content.

Discussion

  1. The chapter says a test suite written entirely by the system that drafted the logic proves little. What would count as an independent test in your pipeline?
  2. A repository history shows who wrote and approved each change. How should a team use that history without turning it into a measure of individuals?
  3. The book rests its refusal of Level 4 for detection content on the cost of a silent miss, not on irreversibility. Why is a silent miss harder to notice than a wrong containment?

Written exercise

Exercise · 35 minutes

Taking a supplier-default rule into the repository

Use the eight steps of the practical guide on one rule that exists only as a supplier default in your own SIEM, or on Nordvik Region's rule for repeated failed sign-ins followed by a success. Rank candidate rules by alert volume over the last 90 days and by relevance. Record the supplier's rule identifier and version. Write the detection record: technique mapping, data sources with health checks, severity and origin. Specify at least one positive case, one negative case and a replay over 30 days of your own logs. Set the alert budget from the median weekly volume, name one owner and a review date, and plan a 14-day shadow run beside the supplier version.

Deliverable: A complete detection record for one adopted rule, with tests, alert budget, named owner, review date and staged rollout plan.

Self-test

Choose an answer to see whether it is right, or open the answer below each question.

  1. What is the chapter's central discipline for accepting a detection?

    Show the answer

    B. It is accepted when a test shows that it fires and a measure shows what it costs in false positives
    The chapter states that a detection is not accepted until a test shows that it fires and a measure shows what it costs. A detection counts only when its test has run recently.

  2. Which kind of detection debt describes a detection whose data source is silent or lacks a required field?

    Show the answer

    D. Blind
    Blind debt means the detection cannot fire because its data source is silent or lacks a field. Stale means the review date has passed, orphaned that the owner has left, noisy that alerts exceed the budget.

  3. What status do supplier-held detections have until the contract grants provenance, logic access, tuning rights and test rights?

    Show the answer

    A. They are treated as Mode 0 Ambient AI and stay declared rather than verified
    The summary states that supplier detections are Mode 0 Ambient AI until the contract grants the four rights, and until then they stay declared.