[Homebrew/Publisher] Secure and unblock tap-owned bottle builds - #1121
Merged
Conversation
Let an exact tap commit carry a closed, checksummed build-recipe tree while Homebrew remains authoritative for source and dependency kegs. Preflight and runtime verification reject alternate registry authority, mutable or undeclared inputs, and unsafe outputs; Formula identity now controls cache reuse.
Run Formula-owned schema-3 recipes behind a peer-authenticated root supervisor under a distinct UID. Project only attested inputs and exact Nix closures, seal dependencies and results, and verify teardown and escape resistance. Keep identity creation transactional and enforce the contract in publication trust checks, focused tests, and the Linux malicious-recipe canary.
Forward the isolated recipe user only at the Formula build and verification commands. Keeping this run-scoped identity out of dev-shell.sh preserves every existing package cache identity while retaining the closed-root execution boundary.
Treat deliberately absent legacy resolver paths as optional systemd masks while retaining fail-closed authority checks. Preserve failed audit units only long enough to expose bounded diagnostics, keep Brew on its protected canonical prefix path, and leave only dependency descendants sealed so Formula installs remain possible.
Refresh the protected build and verification step digests after applying the schema-3 supervisor directly to current main. This keeps the reviewed publisher boundary explicit without including the separate mostly-lazy shell cutover.
This was referenced Jul 27, 2026
Homebrew bottles may contain both process executables and dylink.0 side modules. Validate their distinct loading contracts without treating a filename or mode as an exemption from executable ABI checks. Resolve bin/sbin entrypoints before inspection, reject side modules exposed as process entrypoints, validate side-module memory/import/fork structure, and keep executable ABI-version validation unchanged. Cover valid and malformed roles, unsupported imports, and uninstrumented side-module fork imports.
brandonpayton
marked this pull request as ready for review
July 27, 2026 23:44
Classify each cache-miss Formula under a pinned Ruby authority tool, automatically admitting direct and sealed-recipe builds while keeping the remaining registry bridges explicit. Carry the complete bounded classification record into each build and compare it again at the execution boundary so tap drift cannot escalate authority after provisioning. Reject rootfs dry-runs at the trusted caller boundary, preserve the runtime-only exact-generation contract, and cover the workflow, trust checks, selector, materializer, scope routing, and operator documentation.
This was referenced Jul 28, 2026
Contributor
|
prepare-merge: runtime/materialization tests passed against the synthetic PR merge; package staging and durable package publishing were skipped. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The trusted rootfs recovery lane could publish only Bash, Dinit, and M4. That hardcoded allowlist blocked valid tap-owned Formulae, while running tap code with the publisher's normal authority would expose its filesystem and credentials.
This PR keeps recipe execution isolated and adds a bounded authority decision so the remaining wasm32 Formulae can be published without weakening that boundary.
What changes
modeset -> modesetandnethack -> nethack.Boundaries
This is packaging and publisher infrastructure only. It does not change the kernel, libc, ABI, shell image, demos, or host runtime, and it does not include the shell cutover from #1116.
The exact package generation supplies the fixed wasm32 Formula build/test runtime packages. It does not supply the target Formula's bottle, and the workflow builds the current-main SDK and sysroot separately. A temporary bridge still compiles Homebrew-verified source through an authenticated recipe owned by the exact Kandelo
maincommit.Validation
git diff --checkRollout after merge
maincommit. Do not reuse the earlierb90eff73generation or invoke an unmerged workflow SHA.The existing Bash bottle was produced from already-merged authority and remains valid; this PR does not require rebuilding it.
The exact final head prepared for this PR is
0187ff08addb52c97fdae22d6d7c093645286baeon baseb90eff73960207b59b7db55c7fb4ed46a4d075c0.