R322 · Agent principles and patterns › Evaluation data for agents

Blue-team policy replay: A/B a detection change over one event log, with a tamper-evident receipt

Read the original

evaluation-designagent-securitybenchmarksprovenanceverification

Source: the README of @metaharness/artex-defense, a package inside the metaharness monorepo (MIT; the parent describes itself as "not another agent framework" but "a factory for agent frameworks"). Every mechanism below is the README's own description, not confirmed against the package's source, tests or configuration. No numeric results are published; see "What is missing".

The package calls itself "the blue-team side of a red/blue exercise". Strip the security framing and what remains is a general evaluation design that most teams get wrong, including teams whose detectors have nothing to do with security: how do you tell whether a rule change is an improvement?

The usual answer is to ship the new rule and compare last week to this week. That compares two different weeks of traffic as much as two rules. This package's answer is to compare two policies over identical events.

The core loop

It imports findings from an upstream offensive-security tool, or identity and edge telemetry, then "replays a baseline and a candidate detection policy over the same events", simulates a session quarantine, and pins the outcome to a tamper-evident receipt.

Four properties of that sentence are worth separating, because each is portable on its own:

1. The event log is the fixture. Both policies see the same events in the same order. Any difference in output is attributable to the policy, which is the only condition under which "the new rule catches more" is a claim rather than an impression. This is the same discipline as a golden-file test, applied to a stateful correlation engine rather than a pure function — and it is harder than it looks, because a correlation rule carries state across events and a replay harness has to reset it between runs.

2. The policies differ by one thing. The documented example is precise about this: the baseline recognises a decoy hit from a canary; the candidate does that and correlates an identity credential change with later anomalous use of that identity, within a five-minute window. One added correlation, one added window. A policy diff that changes five rules at once produces a number nobody can attribute.

3. Three tiers of consequence, with the middle one structurally inert. The default mode is monitor. The simulate mode "applies, expires and rolls back session leases in memory", and the README states plainly that "Nothing is enforced on a real system and nothing goes over the network." This is the right shape for a dry run: not a flag that suppresses the final call, but a mode whose implementation has no path to the outside. A dry-run tier that merely declines to act is one if away from acting; one that holds its leases in memory and never opens a socket is a different category of safe.

4. The result carries an integrity receipt — and the README says exactly what that does not prove. The outcome is pinned to a tamper-evident digest. The sentence worth taking away is the limit the authors state themselves: "A digest cannot verify that the collector observed a real compromise." The receipt attests to the integrity of the record, not to the truth of the observation. That is the distinction that gets lost whenever a pipeline grows a signing step, and it is the single most reusable line in the document. A signed artefact invites the reader to treat its contents as verified; all that was verified is that nobody edited them afterwards.

The benchmark corpus has the right shape

A documented benchmark command "draws 20 development and 20 separate incident histories" plus "10,000 benign histories".

Three choices there, all correct, none of them common:

The README is also honest about the ceiling: the benchmark "measures synthetic policy behavior", and field accuracy has to be assessed on "independently labeled traffic". Stating that in the same breath as the benchmark is the behaviour one wants from a tool's documentation and is rarer than the benchmark itself.

What is missing

A review checklist for any detection or rule change

  1. Can the old and new rules be run over the same recorded events, with state reset between runs? If not, that is the first thing to build — before tuning anything.

  2. Does the diff change exactly one mechanism? If not, split it.

  3. Is the benign population in the test corpus proportioned anything like production? Compute the expected alert volume at the real base rate, not the test precision.

  4. Are the tuning incidents disjoint from the reporting incidents?

  5. Is there a dry-run mode whose implementation cannot reach a real system, as opposed to one that chooses not to?

  6. If results are signed or digested, does the surrounding documentation say what the signature does not cover? Write that sentence before anyone relies on the receipt.

  7. What does the pipeline inherit from upstream tools — scope decisions, severity, deduplication — and is that inheritance stated or assumed?

Part of the Research notes on nowucca.com. Figures and claims are the source's own unless the summary says otherwise.