census: sec-unit-app-demobuild overlay and approval card
census-propose for the carlos-app@ hardening (body, read sites unchanged), the new chmodCacheDirs (accepted-legacy) and the quiet Worker.prepareUnit, with the demobuild, host/units and registry envelopes re-pinned. Awaiting the reviewer's verdict on #280.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 files changed,
+37
−0
docs/superpowers/notes/census-proposal-sec-unit-app-demobuild.md+24 −0internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-sec-unit-app-demobuild.tsv+12 −0
diff --git a/docs/superpowers/notes/census-proposal-sec-unit-app-demobuild.md b/docs/superpowers/notes/census-proposal-sec-unit-app-demobuild.md| new file mode 100644 |
| index 000000000..ce1558f1f |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-sec-unit-app-demobuild.md |
| @@ -0,0 +1,24 @@ |
| +# Census approval: sec-unit-app-demobuild |
| + |
| +Ruling `census-ruling-sec-unit-app-demobuild`. The independent reviewer approves or rejects every change below, 2 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| + |
| +| unit | change | read sites | what changed | |
| +|---|---|---|---| |
| +| `internal/host/units/carlos-app@.service` `external` | body | unchanged (1) | sec-review 2026-11-16 D1: the header states unit backing is for operator-trusted tenants only (Paul, 2026-11-16) and set only by box root; the [Service] section gains PrivateIPC=yes, TemporaryFileSystem=/dev/mqueue:ro, ProtectControlGroups=yes, SystemCallArchitectures=native, SystemCallFilter=@system-service, SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd and SystemCallErrorNumber=ENOSYS, copied from carlos-instance@. ExecStart, EnvironmentFile, StateDirectory, the /opt binds and IPAddressDeny are unchanged; it only narrows the tenant sandbox. No root read added. | |
| + |
| +Envelopes re-pinned: `internal/demobuild`, `internal/host/units`, `internal/registry`. |
| + |
| +Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner. |
| + |
| +Recorded dispositions, which each change must still satisfy: |
| + |
| +- `internal/host/units/carlos-app@.service` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input |
| + |
| +New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff: |
| + |
| +- new `internal/demobuild/unit.go:chmodCacheDirs`: reads +file:WalkDir; written legacy, accepted-legacy, frozen |
| +- quiet `internal/demobuild/unit.go:Worker.prepareUnit`: reads nothing now; retired while it reads nothing (or its row keeps no sites) |
| + |
| +Seal: `4eda67fee53800e2cfa4177b954c7f0fce6bdfcfbfe1aa2547ddcec3027b668b` → `dea819de49de5d776703567d37edda16392be916492a68177354c1c10e45a162`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-sec-unit-app-demobuild.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 60fa52cca..a0f8201e7 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -232,3 +232,4 @@ plan14-root-reads-omr-run.tsv f82b5e513d7434e1440c13aa4aa8bc06348745749a21593cf4 |
| plan14-root-reads-fleet-first-reconcile-speed.tsv 9206205b2a3bf27b8b85310f4a44f94ef0c5886d85d6e55dbf2f22e073a8af11 |
| plan14-root-reads-free-storage-250.tsv 9206205b2a3bf27b8b85310f4a44f94ef0c5886d85d6e55dbf2f22e073a8af11 |
| plan14-root-reads-fleet-first-reconcile-speed-4.tsv 4eda67fee53800e2cfa4177b954c7f0fce6bdfcfbfe1aa2547ddcec3027b668b |
| +plan14-root-reads-sec-unit-app-demobuild.tsv dea819de49de5d776703567d37edda16392be916492a68177354c1c10e45a162 |
diff --git a/internal/provision/testdata/plan14-root-reads-sec-unit-app-demobuild.tsv b/internal/provision/testdata/plan14-root-reads-sec-unit-app-demobuild.tsv| new file mode 100644 |
| index 000000000..1d93ff7cc |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-sec-unit-app-demobuild.tsv |
| @@ -0,0 +1,12 @@ |
| +# Census overlay sec-unit-app-demobuild, written by census-propose (#369). census-ruling-sec-unit-app-demobuild, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-sec-unit-app-demobuild.md. |
| +# 1 body, 0 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 2 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 1 quiet units retired while they read nothing, 0 other. |
| +@legacy 5b72bd059d8f67b37695430e852ff1c7487022fc14750c850abb7adc44053bd5 internal/host/units/carlos-app@.service external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-sec-unit-app-demobuild;basis=sec-review 2026-11-16 D1: the header states unit backing is for operator-trusted tenants only (Paul, 2026-11-16) and set only by box root; the [Service] section gains PrivateIPC=yes, TemporaryFileSystem=/dev/mqueue:ro, ProtectControlGroups=yes, SystemCallArchitectures=native, SystemCallFilter=@system-service, SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd and SystemCallErrorNumber=ENOSYS, copied from carlos-instance@. ExecStart, EnvironmentFile, StateDirectory, the /opt binds and IPAddressDeny are unchanged; it only narrows the tenant sandbox. No root read added. file:external@0 ca0b7a58a3d144638e72ec3a952d245f898bf95b554005dc0f32568eef303626 |
| +@legacy 0357359d139f60ef4d8716abaf6baa78faeb313cfb6697111134bd8224f34b1d internal/demobuild/unit.go chmodCacheDirs legacy accepted-legacy accepted-legacy;rev3=census-ruling-sec-unit-app-demobuild;basis=sec-review 2026-11-16 D2: the systemd-family cache chmod, extracted from Worker.prepareUnit. Root walks the build cache (filepath.WalkDir, the same read as before) and still refuses a listed link with ErrBuild; each directory is now opened with instancefs.OpenDirBeneath(cache, rel) (openat2, no link at any component, fstat must be a directory) and chmodded 0777 through that descriptor instead of os.Chmod(path). A directory the previous tenant swaps for a link after the listing is refused, not followed. Reads nothing new; follows less. file:WalkDir@68 a4c07d2bb742a04658e1bd0f851eb02a477569db90f7f68f3f9b45b11d0794ca |
| +internal/host/units/carlos-app@.service external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-sec-unit-app-demobuild;basis=sec-review 2026-11-16 D1: the header states unit backing is for operator-trusted tenants only (Paul, 2026-11-16) and set only by box root; the [Service] section gains PrivateIPC=yes, TemporaryFileSystem=/dev/mqueue:ro, ProtectControlGroups=yes, SystemCallArchitectures=native, SystemCallFilter=@system-service, SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd and SystemCallErrorNumber=ENOSYS, copied from carlos-instance@. ExecStart, EnvironmentFile, StateDirectory, the /opt binds and IPAddressDeny are unchanged; it only narrows the tenant sandbox. No root read added. file:external@0 ca0b7a58a3d144638e72ec3a952d245f898bf95b554005dc0f32568eef303626 |
| +internal/demobuild/unit.go chmodCacheDirs legacy accepted-legacy accepted-legacy;rev3=census-ruling-sec-unit-app-demobuild;basis=sec-review 2026-11-16 D2: the systemd-family cache chmod, extracted from Worker.prepareUnit. Root walks the build cache (filepath.WalkDir, the same read as before) and still refuses a listed link with ErrBuild; each directory is now opened with instancefs.OpenDirBeneath(cache, rel) (openat2, no link at any component, fstat must be a directory) and chmodded 0777 through that descriptor instead of os.Chmod(path). A directory the previous tenant swaps for a link after the listing is refused, not followed. Reads nothing new; follows less. file:WalkDir@68 a4c07d2bb742a04658e1bd0f851eb02a477569db90f7f68f3f9b45b11d0794ca |
| +@remove internal/demobuild/unit.go Worker.prepareUnit |
| +@removed internal/demobuild/unit.go Worker.prepareUnit H3 census-ruling-sec-unit-app-demobuild;basis=sec-review 2026-11-16 D2: its cache WalkDir moved into chmodCacheDirs, which it calls for the systemd family with mode 0777; nothing else changes. |
| +@coverage internal/demobuild bb7a3cd592cb9f21b62ebb1722e29b93ca6f44661405d6ce7d7261f0dbe8e144 |
| +@coverage internal/host/units 7aa62c8655bc21428e09d4c10d44de05d4235497d04bea8a1036d4bb493b2066 |
| +@coverage internal/registry 1a542542fc8e8e1683fde0f8309b47ceecfec05ee41108bc85e25aa1b5a0bd4d |