Skip to content

docs: reference detection spec for REP-001 + spec/catalog sync guard (roadmap #8) - #97

Merged
404SecNotFound merged 2 commits into
mainfrom
docs/detection-spec-rep001
Sep 1, 2026
Merged

docs: reference detection spec for REP-001 + spec/catalog sync guard (roadmap #8)#97
404SecNotFound merged 2 commits into
mainfrom
docs/detection-spec-rep001

Conversation

@404SecNotFound

Copy link
Copy Markdown
Owner

Roadmap 2026-09 item 8, phased on the pilot technique. Blueprint differentiator 5 promises telemetry and detection ship together, but the ndr_rule/ndr_uc labels had no rule content behind them. This authors the first reference detection spec.

What's new

  • docs/detection-specs/REP-001.md — NDR-C2-001, the periodicity detection REP-001's telemetry is shaped to exercise:
    • SIEM-neutral pseudocode: group (src, dst, dpt), measure inter-arrival coefficient of variation + a tight byte band.
    • Thresholds derived from the catalog presets (uniform jitter → cv_max = 0.25 clears all three presets while excluding human traffic).
    • The load-bearing FP tuning: legit software beacons (NTP, updates, EDR, SaaS keepalives) are periodic too, so allowlist known-good egress; browsing separates on record count + byte variance per the benign baseline.
    • How to exercise it (--pace plan), and what a green result does and does not prove (transferability = transfers; delivery loopback-only until first observed fire).
  • docs/detection-specs/README.md — the phased index (pilot → parser-only → the rest after first fire) and the not-a-generated-rule boundary.
  • tests/test_detection_specs.py — fails when the catalog moves (rule id, UC, ATT&CK technique, transferability) and a spec does not follow, and when a spec file names a non-existent technique. This is the drift guard the project's "no test asserts the docs match the code" lesson calls for.

Written documentation only; no Sigma/AIE rule is generated at runtime (respecting the standing constraint). 1092 tests; gates clean. Decision record: docs/roadmap-2026-09.md.

…(roadmap #8)

Blueprint differentiator 5 promises telemetry and detection ship together, but
the ndr_rule/ndr_uc labels had no rule content behind them. This authors the
first reference detection spec, phased on the pilot technique.

- docs/detection-specs/REP-001.md: NDR-C2-001, the periodicity detection its
  telemetry is shaped to exercise. SIEM-neutral pseudocode (grouped
  inter-arrival CV + tight byte band), thresholds derived from the catalog
  presets (jitter -> CV bound), the load-bearing FP tuning (legit software
  beacons are periodic too; allowlist known-good egress; browsing separates on
  record count and byte variance per the benign baseline), how to exercise it
  with --pace plan, and what a green result does and does not prove
  (transferability transfers; delivery loopback-only until first observed fire).
- docs/detection-specs/README.md: the phased index (pilot, then parser-only,
  then the rest after first fire) and the not-a-generated-rule boundary.
- tests/test_detection_specs.py: fails when the catalog moves (rule id, uc,
  ATT&CK technique, transferability) and a spec does not follow, and when a
  spec file names a technique that does not exist.

Written documentation only; no Sigma/AIE rule is generated at runtime. 1092
tests; gates clean.
… en-dash

From /code-review on PR #97, verified before fixing:

- The guard proved less than its name claimed (the recurring class). It now parses
  each spec's own header TABLE and asserts exact matches, generic across every
  REP-*.md so a new spec is guarded the moment it lands:
  - ATT&CK is an exact set comparison, so a spec still naming a technique the
    catalog dropped fails (presence-only could not catch that).
  - Transferability is read from the header cell, not matched anywhere in prose.
  - Rule id / use case / technique read from the header cell.
- Added a REP-001 preset guard (interval per intensity, dpt_choices) for the
  README's 'every threshold ties to a catalog preset' promise. Positive control:
  flipping the transferability cell to contradict the catalog turns it red.
- Index sync now checks rule id, use case AND filename per authored spec.
- Non-vacuous: pins the pilot spec exists so the glob-driven tests exercise
  something.
- A guard that no spec carries an em- or en-dash (both banned in docs). Fixes the
  one en-dash the earlier em-dash-only grep missed (150-2000).

1094 tests; black/ruff/mypy clean.
@404SecNotFound
404SecNotFound merged commit 72d52f0 into main Sep 1, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant