Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-protocols-mv/blob/main/AUDIT_SCOPE.md # aien-protocols-mv Canonical specifications, wire protocols, and schemas for the AIEN sovereign ecosystem Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-protocols-mv / AUDIT_SCOPE.md` 118 lines ยท 6166 bytes Raw Blame History Rendered 1 # Audit scope 2 3 Written for an outside, independent security audit. Revision described: 4 ``f3785177fcaaab7c0f2ce1126616e9fecb4e47b4`` on `main`, 2026-10-26. Everything below is taken from 5 the repository's own files at that revision; items marked NOT_RUN were not executed while writing 6 this document. 7 8 ## What this repository is 9 10 The written contracts the parts of AIEN agree on: byte formats and rules for agent state, 11 inference, evaluation, evidence receipts, crumbs, execution transcripts, compiled Omega units, the 12 Omega shell platform boundary, and task messages between a Raspberry Pi and the DGX Spark. Each 13 contract is a specification in `specs/`, often with test vectors and a small C checker. Ten 14 reference Rust crates live in `crates/`. Implementations live with their owners, not here. 15 Status (README, 2026-10-19): research grade, pre-alpha. `osc-unit-artifact` v1 is FROZEN, 16 `crumb-visible` is Stable, the rest are drafts. No protocol is claimed as qualified on hardware. 17 18 ## What to review, in priority order 19 20 1. `specs/osc-unit-artifact/`: the signed container for a compiled Omega unit (frozen; consumers 21 carry copies of its vectors). Signature coverage, canonical encoding, the committed public keys 22 `keys/owner1.pub` and `keys/test1.pub`, `tools/check-vectors.sh`. 23 2. `crates/aien-provenance`: digests, Merkle trees, signature checks. 24 3. `crates/aien-action-protocol`: actions, capability grants, confinement authorization; 25 `SourceGrant::compute_unsigned_digest` (the V2 transcript described in the README, a breaking 26 change approved 2026-10-26). 27 4. `specs/verified-crumb/` (VC1) and `specs/evidence-receipt/`, `specs/evidence/` (AEI1), 28 `crates/aien-evaluation-protocol`. 29 5. `specs/execution-transcript/` (TRN1) C verifier; `specs/pi-spark-task/` (PST1) C checker and 30 `crates/aien-pi-spark-task` reader and writer. 31 6. `specs/osh-platform/`, `specs/crumb-visible/`, remaining crates. 32 7. `tests/gates/run.sh` (steps `fmt`, `check`, `clippy`, `test`, 33 `zero-disk-secrets`, `anti-slop`, `c-vectors`), `.aien/always`, `.aien/unmapped-ok`, 34 `.aien/verify.pub`. 35 8. Workflows: `aien-verification.yml` (pull request and push, `contents: read`, advisory; checks 36 the Spark's signed result) and `sbom.yml` (SPDX inventory artifact, `contents: read`, actions 37 pinned by commit sha, gates nothing). 38 39 AGENTS.md: a change to `.aien/`, `tests/gates/` or `.github/workflows/` is `BLOCKED_OPERATOR` and 40 runs only when the operator starts it by hand. 41 42 ## Trust boundaries 43 44 - Untrusted: every byte stream a conforming reader parses (artifacts, transcripts, PST1 headers, 45 crumb records); pull request heads. 46 - Trusted: signing keys named by each specification; `.aien/verify.pub` on `main`. 47 - The DGX Spark is the only test judge and runs `tests/gates/run.sh`; GitHub checks are advisory 48 and build nothing from this repository (AGENTS.md, `docs/PIPELINE.md`). 49 - Rule of direction: protocols point inward to nothing; implementations point downward. 50 51 ## Threat model summary 52 53 - Assets: the meaning of each wire format; signature and digest bindings; vectors that consumers 54 copy. 55 - Attackers considered: a producer of crafted input aiming for a reader to accept it or to parse it 56 differently from another reader; a pull request that edits vectors to make a checker pass. 57 - Defended: vectors with fixed verdicts and C checkers that must pass in the same pull request as 58 any text change; frozen status for osc-unit-artifact v1; zero-disk-secrets gate. 59 - Not defended: draft specifications may change; several have no checker in this repository 60 ("nothing yet" in the README table); TRN1 and PST1 are not yet produced by any runtime. 61 - Explicitly out of scope: owner implementations in other repositories. 62 63 ## Build from source at a pin 64 65 Stable Rust (no `rust-toolchain.toml`); bash, coreutils and a C99 compiler for the checkers. 66 `Cargo.lock` is committed. 67 68 ```sh 69 git clone https://github.com/aien-dev/aien-protocols-mv.git 70 cd aien-protocols-mv 71 git checkout `f3785177fcaaab7c0f2ce1126616e9fecb4e47b4` 72 cargo check --workspace --all-targets 73 ``` 74 75 ## Run every test 76 77 ```sh 78 cargo fmt --all -- --check 79 cargo check --workspace --all-targets 80 cargo clippy --workspace --all-targets -- -D warnings 81 cargo test --workspace 82 bash specs/verified-crumb/tools/check-golden.sh 83 bash specs/osc-unit-artifact/tools/check-vectors.sh 84 bash specs/execution-transcript/tools/check-corpus.sh 85 bash specs/pi-spark-task/tools/check-vectors.sh 86 bash specs/osh-platform/tools/check-stream-vectors.sh 87 tests/gates/run.sh c-vectors 88 tests/gates/run.sh zero-disk-secrets 89 tests/gates/run.sh anti-slop 90 ``` 91 92 - `.aien/always`: `PROTO-ZERO-DISK-SECRETS`, `PROTO-ANTI-SLOP`. The `crumb-verify` step and its `CRUMB-VERIFY` gate are retired (DRA-97, 2026-11-07); the `.crumb` files stay as history. 93 - README: on 2026-10-19 all of these passed on the Spark on `main` at ``fb5fca9``, and 94 `crumb verify .` printed `OK: 41 crumbs current`. 95 - All commands above: NOT_RUN while writing this document. 96 97 ## Known limitations and NOT_RUN 98 99 - `evidence-receipt` is a partial extraction; the full extraction is owed. 100 - `agent-state` and `inference` have no checker here. 101 - The SourceGrant V2 digest requires reissuing every previously signed grant. 102 - `aien-verification.yml` sets `REPO_SLUG: aien-dev/aien-protocols` while this repository is 103 `aien-dev/aien-protocols-mv`; whether GitHub redirects this is unknown from the repository. 104 - No fuzzing campaign is recorded in the repository. 105 106 ## Dependencies and provenance 107 108 - Crates.io dependencies locked in `Cargo.lock` (197 packages). The C checkers use only a C99 109 compiler and coreutils; no outside dependencies in the trusted base (AGENTS.md). 110 - Licences: specifications under the Community Specification License 1.0 (`LICENSE-SPEC`), code 111 under Apache-2.0 (`LICENSE-CODE`, `LICENSE`); see also `NOTICES.md`, `ANTI_ENCLOSURE.md`. 112 - SPDX SBOM produced as a workflow artifact by `sbom.yml` per commit. 113 114 ## Evidence 115 116 - There is no `evidence/` directory; test vectors live under `specs/*/vectors/`. 117 - Signed Spark bundles: `aien-dev/aien-receipts` at `aien-protocols//bundle.json` (workflow 118 path). Receipts are append-only and never edited.