diff options
| author | aur-build <aur-build@localhost> | 2026-11-18 10:16:12 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-18 10:16:12 +0000 |
| commit | 12fb09b0ad11c0d9305d606b3b4fced8ba04d385 (patch) | |
| tree | e33d6c974a4c31c01262ebec902c6c853152188b /tests/ops.rs | |
| parent | bc63622a1a91f6e1036eb8e6824c04f922e2654e (diff) | |
| download | aur-build-12fb09b0ad11c0d9305d606b3b4fced8ba04d385.tar.gz aur-build-12fb09b0ad11c0d9305d606b3b4fced8ba04d385.zip | |
I9: the pipeline stops trusting paths the build could have placed, plus README and the invariant index
Three things.
**A real hole, closed.** `collect` scans the build's srcdir for
`*.pkg.tar.zst`, and `ingest` copies whatever those paths resolve to into the
content-addressed store — from where the bytes are served from our repo and
signed with our key. The paths are generated by our own scan, but their *targets*
are not: a PKGBUILD that drops a symlink called `evil.pkg.tar.zst` pointing at
the signing keyring, the database, or anyone's home directory would have its
target copied in, published and signed by us. The chroot is supposed to be the
layer that prevents that, and the chroot tier is gated — but two protection
layers must not be load-bearing on each other, and the control plane should not
depend on isolation for the safety of its own secrets.
`collect` now rejects symlinks and rejects anything whose canonicalized target
escapes the build's own staging directory, failing the build closed with the path
in the message. `i9_a_build_cannot_smuggle_bytes_in_from_outside_its_own_staging_dir`
acts the attack out — the shim plants a symlink to the database file — and
asserts the build fails, the store is byte-for-byte untouched, and nothing
publishes. This is the last §2 invariant that had no named test; docs/INVARIANTS.md
says plainly which part of I9 this covers and which part belongs to the gated
chroot tier.
**README.md**, written for the person who has to operate this at 3am: the rule
everything else follows, the quick start, the layout, how the shim harness makes
the whole pipeline testable without root or network, the ops commands, the route
table, and the §14 constraints stated as the hard edges they are.
**docs/INVARIANTS.md**, mapping I1-I12 to the named tests that hold them, with
corroborating tests listed, and an explicit note on the two invariants enforced
by the schema (the partial unique index for I7, the append-only triggers for
I10/I7) so a future code path cannot forget them.
Also recorded in DECISIONS.md: metrics served without a session and why,
retention recording a purge instead of deleting the row, and the real-chroot tier
being explicitly skipped with what stands in for it and how to actually run it.
.gitignore already covered .pi/ but the goal-tracker files were tracked from
before the rule existed; untracked now so they stop appearing in every diff.
Diffstat (limited to 'tests/ops.rs')
0 files changed, 0 insertions, 0 deletions
