interplane.Get Omega
Read in your language

aien-receipts

Append-only AIEN verification receipts, indexed by repository and exact source commit. Read verdicts, signatures and retained logs before making a claim.

Brought by drakestapleton

branch main Branches Tags History

aien-receipts / audit / VERIFY.md

63 lines · 3039 bytes Raw Blame History Rendered
1# Verifying an org audit stamp yourself
2
3Every step below runs on your own machine against public data. You need `git`, Python 3.10+,
4a C compiler (for the pinned `crumb` checker) and, for the signature, the GitHub CLI.
5
6## 1. Install the pinned tools
7
8```sh
9git clone https://github.com/aien-dev/aien-receipts && cd aien-receipts
10python3 audit/tools/install_tools.py /tmp/audit-tools
11```
12
13The installer downloads every binary listed in `audit/tools/tools.lock.json` and refuses any file whose
14SHA-256 differs from the lock. Python tools (semgrep, zizmor) are pip-installed at exact versions into
15`/tmp/audit-tools/venv`; the semgrep rules are checked out at the pinned commit; `crumb.c` is fetched
16from `aien-architecture-mv` at the pinned commit and its SHA-256 compared before it is built.
17
18## 2. Check that the stamp is well formed
19
20```sh
21python3 audit/tools/verify.py audit/stamps/<repo>/<sha>
22```
23
24This validates the schema, recomputes the SHA-256 of every check output and review report the stamp
25cites, and recomputes the verdict ceiling: a stamp may never claim a better verdict than its own
26contents allow (see `audit/tools/stamp.py`).
27
28## 3. Re-run the deterministic checks (public repositories)
29
30```sh
31git init -q /tmp/src && git -C /tmp/src fetch -q https://github.com/aien-dev/<repo> <sha>
32git -C /tmp/src worktree add -q --detach /tmp/wt <sha>
33python3 audit/tools/verify.py audit/stamps/<repo>/<sha> --rerun /tmp/src --worktree /tmp/wt --tools /tmp/audit-tools
34```
35
36Exit codes: `0` every reproducible check output matched byte for byte; `1` a mismatch (named on
37stderr); `2` NOT_RUN, because the checker source, the tool lock or a tool version differs from the one
38the stamp recorded. `2` is not a pass. C11 (dependency advisories) queries the live OSV database, so it
39is recorded with its date and is not compared.
40
41## 4. Check the signature
42
43```sh
44gh attestation verify audit/stamps/<repo>/<sha>/stamp.json --repo aien-dev/aien-receipts \
45 --signer-workflow aien-dev/aien-receipts/.github/workflows/audit-attest.yml
46```
47
48A valid attestation shows that the `audit-attest` workflow, on a GitHub-hosted runner, validated the
49stamp and re-ran its checks before signing. It does not show that a model review was right or complete:
50read the review reports in the stamp directory and their `files_covered`.
51
52## 5. Is the stamp current?
53
54`audit/status.json` is refreshed daily. `CURRENT` means the default-branch HEAD still equals the
55stamped commit; `STALE` means HEAD has moved and the stamp describes an older tree; `UNKNOWN` means
56HEAD could not be read; `NOT_CHECKABLE` marks private repositories; `SUPERSEDED` means a newer stamp
57exists. You can check one yourself: `git ls-remote https://github.com/aien-dev/<repo> HEAD`.
58
59## Private repositories
60
61They appear only as `private-01` .. `private-11` with a salted SHA-256 commitment
62(`sha256("<salt>:<name>")`). Their stamps carry `self_reported: true`: nobody outside can re-run
63them, so step 3 does not apply, and the signature attests only that the stamp was well formed.