interplane.Get Omega
Read in your language

omnet

aien-dev/omnet

Brought by drakestapleton

branch main Branches Tags History

omnet / AUDIT_SCOPE.md

169 lines · 10400 bytes Raw Blame History Source

Audit scope

Written for an outside, independent security audit. Revision described: 83f605b147205bd912b085afdcf24402df24b5e5 on main, 2026-10-26. Everything below is taken from the repository's own files at that revision; items marked NOT_RUN were not executed while writing this document.

What this repository is

omnet rewrites security-critical network code in Omega (.om), a language from aien-dev/omega-mv whose compiler emits AArch64 Linux programs. The first project is the server side of Tailscale Tailnet Lock (TKA) for self-hosted Headscale control servers. All TKA logic, cryptography, parsing and durable state ship as Omega: the om/ libraries and the tkad daemon in cmd/tkad/. The Headscale adapter is a Go patch (integration/headscale/) that the README describes as transport and authentication glue. Go and Python under test/ directories and integration/e2e/ are test oracles and drivers and never ship. Status per README and docs/design/tailnet-lock.md: implemented and verified in isolation; not deployed, not production-qualified, not a production security audit.

What to review, in priority order

  1. cmd/tkad/socket.om, cmd/tkad/rpc.om, cmd/tkad/adapter.om, cmd/tkad/main.om. The AF_UNIX IPC service: a 20-byte request header, a JSON body of 0..65536 bytes, 3-second per-phase deadlines, the admin assertion byte (exactly 0 or 1) and the NodeID. Check that bad or oversized headers close without a reply, that every RPC binds JSON NodeKey to the registered key of the header NodeID, that RPCs 1, 2 and 6 and registry/map commands require admin, and that error bodies never echo request details or secrets.
  2. om/tka/tka.om, om/tka/tkastate.om, om/tka/tkapool.om, om/tkasig/tkasig.om. The authority chain and node-key signature checks. Check fail-closed behaviour (design rule 3): parse and signature failures reject; unknown signed AUM kinds advance the hash chain as no-ops and never bypass authorization.
  3. om/ed25519/, om/sha512/, om/blake2s/, om/blake2b/, om/argon2/ (with argon2pool.om). Signature verification and hashing used for authority and the disablement secret. Check correctness against the committed vectors and the bounds on inputs. No constant-time claim is made.
  4. om/cbor/, om/codec/, om/json/. Parsers of attacker-controlled bytes (CBOR AUMs and signatures, base64/hex, JSON RPC bodies). Check that every read has a capacity and that size limits are checked before parsing (design rule 1).
  5. om/store/store.om, om/store/storepool.om, cmd/tkad/state.om. Durable snapshots, record framing and capacity charges (65536 records, 33554432 bytes). Check descriptor-based operation (design rule 2), recovery refusing missing or corrupt snapshots, and the charges described in qualification/security3-store/README.md.
  6. om/quantity/quantity.om. Checked arithmetic used by the store charges.
  7. integration/headscale/headscale.patch. Go glue added to Headscale v0.29.6: Noise identity resolution, the admin user ID setting, reconciliation, SQL migrations, publication barrier, bounded admission slots. Check that a caller's identity is resolved before daemon work, that startup refuses when adapter state exists but settings are missing, and that pending signatures are never treated as trusted map signatures.
  8. tools/omc.sh, tools/build-tkad.sh, integration/headscale/build.sh. Supply chain: the compiler is cloned from GitHub at the pinned commit, built by its seed chain and checked against the pinned digest; the Headscale build verifies the pinned commit.
  9. Test suite integrity: tools/test.sh, om/*/test/run.sh, cmd/tkad/test/run.sh, cmd/tkad/test/mutant.py. AGENTS.md requires a mutant check per unit that counts only when the driver completes and a result differs.

.github/workflows/ci.yml (added by the audit-readiness change) builds the pinned omc through tools/omc.sh and runs sh tools/test.sh on a GitHub-hosted arm64 runner with Go installed for the oracles; a second job publishes an SPDX SBOM artifact. Every action is pinned by commit sha and the token is read-only.

Trust boundaries

Threat model summary

Build from source at a pin

Requirements from README: Linux on ARM64, git, POSIX sh, Python 3, and Go >= 1.26.5 for the TKA differential oracle. The Headscale adapter build uses go1.27.3.

Compiler pin, from omega.pin:

tools/omc.sh clones https://github.com/aien-dev/omega-mv.git into build/omega-mv, checks out the pinned commit, runs seed/omega-from-seed.sh, and exits non-zero if the result's sha256 differs from the pin. It checks the pin, not seed/out/omc.sha256.

tools/omc.sh                       # prints the path of a verified omc
sh tools/build-tkad.sh             # builds build/tkad from the om/ and cmd/tkad/ sources
GO=/path/to/go sh integration/headscale/build.sh   # optional adapter, output build/headscale

The Omega build needs an AArch64 Linux host. The Headscale and client builds need network access to GitHub and the Go module proxy.

Run every test

tools/test.sh
GO=/path/to/go GOTOOLCHAIN=auto sh integration/e2e/build-clients.sh
GO=/path/to/go GOTOOLCHAIN=auto sh integration/headscale/build.sh
sh tools/build-tkad.sh
sh integration/e2e/run.sh

Known limitations and NOT_RUN

Dependencies and provenance

Evidence

There is no evidence/ directory. Verification results are recorded in prose in docs/design/tailnet-lock.md (stages three to six, including controller SHA-256 71ffcb5e6aed6bd6b2ec441b718220e2ad1d70d3fa767c728d104447f8668807 for the rebuilt Headscale binary) and in qualification/security3-store/README.md. Receipts for this repository, where filed, belong under aien-dev/aien-receipts omnet/<sha>/; whether any exist is unknown from the repository. Receipts are append-only and never edited.