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-sovereign-core-mv/blob/main/AUDIT_SCOPE.md # aien-sovereign-core-mv AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination. 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-sovereign-core-mv / AUDIT_SCOPE.md` 137 lines ยท 7999 bytes Raw Blame History Rendered 1 # Audit scope 2 3 Written for an outside, independent security audit. Revision described: 4 ``f30eb963918d71dd2998b1cb936c251429417de1`` 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 Rust workspace of the AIEN host runtime and its verification tooling, running on Linux on the 11 NVIDIA DGX Spark (GB10). It contains the `aien` command line and runtime daemon, model loading, a 12 paged KV cache, a batching scheduler, an OpenAI-compatible HTTP server, Rust bindings to the Omega 13 GPU engine (`crates/aien-omega-*`, pinned by `omega.lock`), the AIEN verification pipeline 14 (`tools/aien-test`, `tools/aien-local-ci`), release and install scripts, ALLEN identity crates, and 15 supporting `spark-*` services. Status (README): research-grade; the GPU inference path is in alpha 16 testing on the DGX Spark only and its three-run physical qualification is NOT_RUN; the rest is 17 pre-alpha; no public release exists. 18 19 ## What to review, in priority order 20 21 1. Verification pipeline: `tools/aien-test` (gate manifests, verdicts, evidence receipts, signed 22 bundles, `verify-bundle`), `tools/aien-local-ci` (worker, `pipeline.sh`, `aien-run-exec`, 23 `forgejo-webhook.sh`, `siblings`), `tools/aien-verify`, `crates/aien-verify`, 24 `crates/aien-campaign-verifier`. Every pull request in every AIEN repository is judged by this 25 code; check sandbox escape, verdict forgery, bundle signature checks, and the 26 `BLOCKED_OPERATOR` rule for pipeline-config changes (`tools/aien-test/docs/LOCAL_VERIFICATION.md`). 27 2. `crates/aien-serve-http`: bearer-token check (`AIEN_SERVE_HTTP_BEARER_TOKEN`, required at 28 startup), request parsing, context limits (`--max-context`), refusal when the KV cache cannot 29 hold the request. 30 3. `crates/aien-cli`: approval floors (catastrophic commands, runtime self-files, `sudo` with a 31 password on stdin, operator deny patterns), approval modes (`AIEN_APPROVAL_MODE`), unattended 32 denial, and the per-turn snapshot store and hash-chained write ledger behind `/rollback`. 33 4. Release and install: `install.sh`, `install.ps1`, `install-inquisitor.sh`, 34 `scripts/release-publish-gate.sh`, `scripts/check-release-candidate.sh`, 35 `docs/release/RELEASE_SIGNING.md`, `docs/release/allowed_signers`, 36 `docs/release/internal_test_signers`, `release/candidate.toml`. 37 5. Capability and agent boundary crates: `aien-capability`, `aien-mcp`, `aien-switchboard`, 38 `aien-security`, `spark-aegis`, `aien-allen*`. 39 6. Native linking: `crates/aien-abi-conformance` build script checking omega archive digests 40 against `native-artifacts.lock`; `crates/aien-omega-*` FFI. 41 7. Workflows: `.github/workflows/aien-verification.yml` (advisory checks and Alpha bundle 42 verification, `contents: read`), `release.yml` (tag `v*` or manual; publish job has 43 `contents: write`), `release-dry-run.yml` (manual, read only, no secrets), `release-publish.yml` 44 (manual, workflow default token has no permissions, one job with `contents: write`), and 45 `.forgejo/workflows/ci.yml` (push and pull request on a self-hosted runner labelled `spark`, 46 uses `actions/checkout@v4` by tag rather than sha). 47 8. `tests/gates/run.sh` and the gate manifests. 48 49 ## Trust boundaries 50 51 - Untrusted: HTTP clients of `aien-serve-http`; model output and tool requests reaching the agent 52 CLI; candidate code in any pull request the pipeline tests; downloaded release archives before 53 signature verification. 54 - Trusted: the Spark signing key (public half in `.aien/verify.pub` on `main`); release signers in 55 `docs/release/allowed_signers`; pinned omega archives (`native-artifacts.lock`); the pinned 56 toolchain (`rust-toolchain.toml`, Rust 1.98.1); the operator present at the desk. 57 - The public release key is not pinned yet (`AIEN_RELEASE_SIGNER` is empty until the key 58 ceremony), so nothing can install with `signature_check` `release`. 59 60 ## Threat model summary 61 62 - Assets: integrity of verdicts and signed bundles for all AIEN repositories; release signing; 63 files on the operator's machine reachable by the agent; inference service availability. 64 - Attackers considered: a malicious pull request (to any AIEN repository) trying to reach a PASS 65 or escape the sandbox; an unauthenticated network client of the HTTP server; a prompt-injected 66 model issuing destructive tool requests; a tampered release archive. 67 - Defended: trust anchors read from the base ref, not the head; gate changes run only by the 68 operator; bearer token on inference requests; approval floors that hold in every mode; signed 69 release checksums verified with `ssh-keygen`; recorded native archive digests. 70 - Not defended / explicitly out of scope: no public release and no pinned release key; the release 71 gate fails on current main (README, issue #414); the GPU fallback counter covers only 72 instrumented operations; the agent rollback path has not run against a live model (README). 73 74 ## Build from source at a pin 75 76 Rust 1.98.1 from `rust-toolchain.toml`. Native pins: `omega.lock` 77 (``a647b6a9821fffcf52ba9ce813f75afa4b84be62``), `native-artifacts.lock` (sha256 per omega archive, 78 target and compiler), `crumb.lock`. 79 80 ```sh 81 git clone https://github.com/aien-dev/aien-sovereign-core-mv 82 cd aien-sovereign-core-mv 83 cargo test --workspace -- --test-threads=1 84 scripts/repro-build.sh -p aien-cli 85 ``` 86 87 The GPU server build (`./install.sh --with-server`) needs a DGX Spark with the NVIDIA open 88 driver; NOT_RUN on a plain host. 89 90 ## Run every test 91 92 ```sh 93 cargo fmt --all -- --check 94 cargo check --workspace --all-targets 95 cargo clippy --workspace --all-targets -- -D warnings 96 cargo test --workspace -- --test-threads=1 97 tests/gates/run.sh 98 ``` 99 100 Gate steps in `tests/gates/run.sh` include `fmt`, `check`, `clippy`, `test`, 101 `strict-mode`, `zero-cuda`, `zero-disk-secrets`, `anti-slop`, `inquisitor`, `release-gate-negatives`, 102 `release-dry-run`, `aien-verify-tests`, `pins-selftest`, `native-identity`, `install-test`, 103 `scoring-v5`, `preflight-guard`, `agent-preflight`, `linked-compose`, `gb10-serve-chat`, 104 `gb10-model-dir`, `kv-props`, `miri`, `trn1`, `crb1` and `verify-closure`. `.aien/always` runs 105 `SC-ZERO-CUDA`, `SC-ZERO-DISK-SECRETS`, `SC-ANTI-SLOP` and `SC-INQUISITOR` on every 106 change. The `crumb-verify` step and its `CRUMB-VERIFY` gate are retired (DRA-97, 2026-11-07); `.crumb` 107 files and `crumb.lock` stay as history. 108 109 The DGX Spark is the test judge: it runs these gates and signs a bundle. GitHub checks are 110 advisory (workflow header: nothing on GitHub gates a merge). `SC-GB10-SERVE-CHAT` requires the GB10 111 and a downloaded model; NOT_RUN on a plain host. All commands above: NOT_RUN while writing this 112 document. 113 114 ## Known limitations and NOT_RUN 115 116 - GPU path three-run physical qualification: NOT_RUN. 117 - Qwen full-runtime qualification incomplete; C1 evidence campaign in progress. 118 - `.forgejo/workflows/ci.yml` runs pull request code on a self-hosted runner and pins 119 `actions/checkout` by tag; whether this runner is active is unknown from the repository. 120 - Some `evidence/` directories are named `INVALID` (for example 121 `qwen38-omega-full-20261018T1641Z-INVALID-oom`); they are kept as failed records. 122 123 ## Dependencies and provenance 124 125 - `Cargo.lock` for the workspace; crates.io dependencies. 126 - Native archives from omega, digests in `native-artifacts.lock`; mismatches fail `build.rs`. 127 - Licences: Apache-2.0; third-party notices in `THIRD_PARTY.md`, `ATTRIBUTION.md`, `LICENSES/`. 128 - No Python (`scripts/check-no-python.sh`); no CUDA toolkit (`zero-cuda` gate). 129 - Model weights are downloaded separately from Hugging Face at a pinned revision named in the 130 README; they are not in the repository. 131 132 ## Evidence 133 134 - `evidence/` and `docs/inference/evidence/` hold run records; `docs/release/receipts/` holds 135 release receipts. 136 - Signed Spark bundles: `aien-dev/aien-receipts` at `aien-sovereign-core//bundle.json` 137 (workflow path). Receipts are append-only and never edited.