diff --git a/docs/README.md b/docs/README.md index e8abe91..ca24529 100644 --- a/docs/README.md +++ b/docs/README.md @@ -21,7 +21,7 @@ This is the public documentation and evidence repository for Aether's AI securit - [BLU4 purple range scoreboard format](research/blu4-range-scoreboard-format.md) explains how attack runs against a BLU4-watched guest will be scored and checked. No runs yet. - [BLU4 replay recording v1](research/blu4-replay-recording-v1.md) is the file format for recording the observations a run delivered and replaying them offline. Draft; two rehearsal recordings so far, none from a guest. - [BLU4 promotion ladder v1](research/blu4-promotion-ladder-v1.md) adds the owner-signed records that move a rule from observe to would-hold to hold, and the receiver-signed demotion that drops it back after one false hold. Draft; 14 refusal vectors, checked in the Python shell on Linux. -- [R4D findings v1](research/r4d-findings-v1.md) covers the finding record, the regression set and the pre-deploy gate verdict R4D uses day to day. Draft; loopback runs only, none from a guest. +- [R4D findings v1](research/r4d-findings-v1.md) covers the finding record, the regression set, the pre-deploy gate verdict and gate waivers R4D uses day to day. Draft; loopback runs only, none from a guest. - [BLU4 sensor kit and coverage map v1](research/blu4-sensor-kit-v1.md) is the heartbeat every kit-built sensor sends and the per-asset map of which planes have a live sensor, where a silent sensor shows as blind. Draft; no map of a real host yet. - [Authorized security testing](research/htb-academy-nmap.md) records the roles of the operator and the Predator agent in the Academy lab. - [Earlier platform overview](https://github.com/AetherAi4/Predator/blob/e0ceff1026b29409602b1763b7cf98d22367324f/README.md) preserves the previous README, including the subsystem map, experiment timeline, glossary, and historical names. diff --git a/docs/research/r4d-findings-v1.md b/docs/research/r4d-findings-v1.md index ae0dafd..b5d4975 100644 --- a/docs/research/r4d-findings-v1.md +++ b/docs/research/r4d-findings-v1.md @@ -1,8 +1,9 @@ # R4D findings, regression checks and the pre-deploy gate (v1) Status: **draft**. These are the formats R4D uses on the everyday path: a finding a person can act on, a -regression set that keeps every fixed finding checked, and a signed pass or refuse for a release. The code lives -in AETHER-PREDATOR-M (Lane 50, `predator/gen4_defense/purple_range`). Every claim carries one label: +regression set that keeps every fixed finding checked, a signed pass or refuse for a release, and a waiver a +person signs to let a release ship with a known open finding. The code lives in AETHER-PREDATOR-M (Lane 50 and +Lane 61, `predator/gen4_defense/purple_range`). Every claim carries one label: **measured**, **built-not-run** or **design**. ## Rules that never bend @@ -16,10 +17,13 @@ in AETHER-PREDATOR-M (Lane 50, `predator/gen4_defense/purple_range`). Every clai - A run that can't say (script failed, void step records, no target traffic, guest-only evidence) is `UNDETERMINED`. It is never read as a pass. - Nothing here runs against production. +- A release ships with a known open finding only when a person signed a waiver for it, with an owner, a reason + and an expiry. No waiver refuses. An expired waiver refuses. A returned finding is never waivable in the + release it returned in. ## Byte rules -All four records below use the purple range rules: canonical JSON (members sorted, no insignificant whitespace, +All the records below use the purple range rules: canonical JSON (members sorted, no insignificant whitespace, ASCII only, integers only), digests are `sha256:` and lowercase hex of the canonical bytes. None is signed directly. Its digest goes into a `predator.chain-link/v1` statement signed with Ed25519, exactly as for range results, so `predator-verify chain` (and `receipt`) checks every signature offline. predator-verify checks the @@ -74,16 +78,41 @@ carries `set`, `seq`, `at` and `kind`: | `open` | `target`, `signer` (raw Ed25519 public key, hex), `standing_scope` (`receipt_digest`, `engagement_id`, `expires_at`) | | `add` | `check_id`, `finding_id`, `finding_digest`, `fix_evidence_digest`, `retest_command` | | `returned` | `check_id`, `finding_id`, `finding_digest`, `original_finding_id`, `evidence_digest` | +| `returned` (optional) | `release`: the release name, when the gate found the return | | `retire` | `check_id`, `reason` (non-empty) | -| `rescope` | `standing_scope` | +| `rescope` | `standing_scope`, `replaces` (the `receipt_digest` of the scope standing until now) | A reader refuses the whole set when any event is out of sequence, not signed by the `open` signer, not bound into the chain, or breaks its kind's rules. A finding is `add`ed only after its check comes back `NOT_CONFIRMED`. A set runs only under its standing scope, against its own target, while that scope admits it. +A `rescope` whose `replaces` is not the scope standing at that point breaks the set. `regress-rescope` writes one +only when the new receipt verifies under the pinned scope key and admits the set's target now. -## `r4d.gate-verdict/v1` +A returned finding can be marked fixed again (`finding-fixed` on the returned record) once its check stops +confirming; that appends a new `add` naming it. -The answer to a release pipeline. Its own one-link chain `r4d-gate/`. +## `r4d.waiver/v1` + +A person accepting one known open finding for a while. Its own one-link chain `r4d-waiver/`, signed by +the owner's key. The gate takes that key pinned on its command line (`--waiver-key`), as it takes the scope key. + +| Member | Value | +| --- | --- | +| `waiver_id` | `w-` and the first 16 hex of the digest of `[finding_id, owner, issued_at, expires_at, signer]` | +| `finding_id`, `finding_digest` | the issued `r4d.finding/v1` it covers | +| `check_id`, `target` | the finding's check, and `range_id` and `address` of its target | +| `owner` | who accepts the risk (non-empty) | +| `reason` | why (non-empty) | +| `issued_at`, `expires_at` | UTC instants; `expires_at` is after `issued_at` | +| `signer` | raw Ed25519 public key of the owner, hex | + +`waiver-sign` signs one only for a finding that verifies under the range key, and **refuses when the owner key is +the range key**: the automation that found it cannot accept it. + +## `r4d.gate-verdict/v2` + +The answer to a release pipeline. Its own one-link chain `r4d-gate/`. v2 is v1 plus waivers; a v1 +verdict still verifies under the v1 rules below. | Member | Value | | --- | --- | @@ -92,15 +121,35 @@ The answer to a release pipeline. Its own one-link chain `r4d-gate/`. | `changed` | the components the pipeline named, sorted | | `target`, `scope_receipt_digest` | the staging target and the receipt that admitted it | | `regression_set` | `null` or `{chain_id, head}` of the set it used | -| `checks` | every selected check: `check_id`, `source` (`regression` or `preregistered`), `outcome` (or `NOT_RUN`), `run_id`, `evidence_digest`, `returned_finding` | +| `release` | the release name the pipeline gave, or `null` (v2) | +| `checks` | every selected check: `check_id`, `source` (`regression` or `preregistered`), `outcome` (or `NOT_RUN`), `run_id`, `evidence_digest`, `returned_finding`, and in v2 `waiver` (`null` or a `waiver_id`) | +| `waived` | v2: one entry per applied waiver: `check_id`, `waiver_id`, `waiver_digest`, `finding_id`, `owner`, `reason`, `expires_at` | | `reasons` | why it refused; empty on a pass | | `uncovered_components` | changed components no check touches | -`checks` must be exactly the checks the changed components select. `PASS` needs every one `NOT_CONFIRMED` with -its evidence digest and no reasons. `REFUSE` needs at least one reason. When the gate can't run (no staging +`checks` must be exactly the checks the changed components select. `PASS` needs every one `NOT_CONFIRMED`, or +`CONFIRMED` under a named waiver, with its evidence digest and no reasons. `REFUSE` needs at least one reason. When the gate can't run (no staging target in scope, closed window, wrong standing scope, set bound to another target, unknown component) it still signs a `REFUSE`, with the checks it would have run as `NOT_RUN`. **The gate never skips.** +A confirmed check is waived only when all of these hold, and otherwise the verdict refuses and says which failed: + +- the source is `preregistered`. A `regression` check that confirms is a returned finding and is never waived; +- a waiver signed by the pinned key names this check on this target and is live at `started_at` + (`issued_at <= started_at < expires_at`); +- the regression set records no `returned` event for this check under this `release`; +- if the check ever returned after a fix, the waiver names that returned finding, not the original; +- the gate was given the regression set and a release name, and the waiver key is not the range key. + +A waiver file in the folder that does not verify refuses the gate rather than being skipped. `gate-verify` with +`--waivers` and `--waiver-key` re-checks each applied waiver: signature, digest, coverage and liveness at +`started_at`. A verdict that applied waivers does not verify without them. + +## Metric + +`findings-open` reads issued findings, the regression set and the waivers, and counts findings on the set's +target with **no fix and no live waiver** (target 0). It exits 1 while any is open. + ## Status | Part | Label | @@ -109,8 +158,12 @@ signs a `REFUSE`, with the checks it would have run as `NOT_RUN`. **The gate nev | Re-test command reproduces a confirmation on a fixture copy of the range | **measured**, CONTROLLED, loopback | | Fix, reintroduce, reported as returned citing the original | **measured**, CONTROLLED, loopback | | Gate refuses a reintroduced fix and runs only the checks a change touches | **measured**, CONTROLLED, loopback | +| Gate passes a known finding under a live waiver and names it; refuses with no waiver, an expired waiver, an unpinned or range-key signer, and a returned finding in its own release | **measured**, CONTROLLED, loopback | +| `regress-rescope` and the `replaces` rule | **measured**, CONTROLLED, loopback | +| Waiver links verify with `predator-verify chain` | **measured**, Python shell in tests | | Every link above verifies with `predator-verify chain` | **measured**, Python shell in tests, Node shell by hand | | Checks, sets and gates on a P-BOX guest | **built-not-run** until P-BOX has a range transport | | Guest evidence for the two guest-only checks | **design** | -AI assistance: Claude (Anthropic) drafted this format from the Lane 50 brief and the code it describes. +AI assistance: Claude (Anthropic) drafted this format from the Lane 50 and Lane 61 briefs and the code it +describes.