Lesson 10 of 13 · 14m
If You Didn't Fire It, You Didn't Ship It
Atomic Red Team positive and negative tests, replayed event corpora, and the CI checks that catch rules broken by field renames.
A rule that has never fired is not a detection; it is a YAML file with aspirations. The silent-failure modes are legion: the logsource maps to a field your pipeline renamed, the modifier compiled to syntax the target doesn't support, the event ID is right but the field exists only when a GPO you never checked is enabled. None of these produce an error. They produce a rule that matches nothing, forever, while the coverage map stays green.
Atomic Red Team
Red Canary's Atomic Red Team (github.com/redcanaryco/atomic-red-team) is a library of small, per-technique tests indexed by ATT&CK ID. Invoke-AtomicTest T1003.001 runs the LSASS-access tests on a Windows box — including the rundll32 comsvcs.dll MiniDump variant. Run it in a lab, watch Sysmon 10 events flow, confirm the rule fires. That is the positive test: proof the telemetry path and the detection logic both work end to end. Invoke-AtomicTest also carries -CheckPrereqs and -Cleanup — the tests leave artifacts (created files, dropped binaries), and a lab box full of leftover test malware is its own false-positive factory on the next run.
The negative test is the one people skip. A detection needs a benign near-miss it must not fire on — antivirus touching LSASS, an admin running procdump, a service account's normal ticket requests. If your rule can't tell mimikatz from MsMpEng, you didn't write a detection; you wrote a noise source. Run the benign activity deliberately and record the non-fire as a test result, not an assumption.
MITRE CALDERA and Splunk Attack Range do the same job at campaign scale — full attack chains, not single techniques — for validating temporal correlations that need a sequence to fire.
Replay is cheaper than adversaries
You don't need to rerun the attack to retest the rule. Capture the events the first atomic test produced — exported EVTX, JSON dumps, Zeek logs — and commit them beside the rule. Every change to the rule or the parser gets tested by replaying the corpus: positive samples must still fire, negative samples must still not. This is detection-as-code's actual payoff: the test suite is real telemetry, replayed deterministically in CI, and it catches the field-rename breakage that production never would.
The CI that catches it
Three checks in the pipeline:
- Conversion —
sigma convertevery rule for every backend you deploy to. Failure here is a syntax/portability bug caught before deploy. - Replay test — stored event corpus through the compiled rule; assert fire/don't-fire per sample.
- Field presence — the rule references
CommandLine; the corpus provesCommandLineexists in your actual 4688 events. If your domain never enabled command-line auditing, the corpus shows empty fields and the rule fails its own test.
A fourth belongs on the schedule, not in CI: re-run the atomic tests against the production pipeline periodically. The lab proves the rule works; the production replay proves the source still feeds it. The gap between them is where detections rot — sources change format without announcing it, a Windows update renames a field, a firmware update reorders syslog fields, and the stored corpus keeps passing while the live feed silently changed.
Purple teaming is the honest version
The most effective test cadence isn't automated at all: a red operator executes the technique while a blue operator watches the console, live. The automation proves the mechanism; the live exercise proves the analyst recognizes what the mechanism looks like when it fires. Both results matter, and only one of them fits in CI.
The bar for "tested" is a timestamped record — which test ran, which rule version it ran against, and whether it fired — committed alongside the rule. "We ran Atomic Red Team once last year" is not a test record; it is a rumor.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
Immich Had Fourteen Advisories and One Bug It Fixed Three Times
Immich's 2026 security record runs to fourteen advisories, and they cluster hard: the sharing features, the OAuth plumbing, and one login redirect parameter that took three separate fixes across eighty-three days. Plus the 3.0 migration traps still waiting for anyone who hasn't jumped yet.
Jellyfin's Threat Model Is Your Brother-in-Law
Four Jellyfin CVEs landed in 2026 and not one of them needs an admin account. One needs only the ability to name a file. Meanwhile Jellyfin 12 shipped in September, the version numbers stopped starting with 10, and every "am I patched" check you wrote is now wrong.
Node.js Fixed 16 Flaws in One Release. Most of Them Live in HTTP/2 and TLS.
The November 11 Node.js security releases fix 16 CVEs across the 26, 24 and 22 lines, seven of them rated high. Nearly all sit in HTTP/2 and TLS, where a remote client can crash a server, leak memory, or get past per-host client-certificate checks.
Next.js Shipped Seven Advisories and Six of Them Are the Cache
The November 2026 Next.js security release patches seven issues, and six live in the new Cache Components layer, the feature meant to make your app faster by remembering more. Three hit self-hosted next start specifically: the ones Vercel's own platform quietly absorbs.