homebrew: let isolated Formula builds read reviewed sources - #958
Closed
brandonpayton wants to merge 1 commit into
Closed
homebrew: let isolated Formula builds read reviewed sources#958brandonpayton wants to merge 1 commit into
brandonpayton wants to merge 1 commit into
Conversation
Formula builds run as a separate system identity that cannot traverse the runner checkout parent. Bind the reviewed Kandelo and tap trees into each transient service through root-owned read-only aliases, hide their original paths, and fail explicitly when source auditing cannot traverse a protected tree.
Member
Author
|
Closing as superseded by #957. That PR preserves the generic tap-identity change as its first commit and carries this reviewed-source alias implementation as its second commit, with the additional exact-mapping trust checks and two-alias write-protection assertions requested during review. No implementation from this PR is being dropped. Superseded exact head: |
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 sqlite, bzip2, and xz Homebrew pilot builds all stop immediately after
brew trust, before Homebrew evaluates a formula. Kandelo intentionally runs Formula code as a separate, unprivileged Linux user, but GitHub Actions stores the checked-out Kandelo and tap repositories below/home/runner/work. That parent directory is not traversable by the Formula user. The publisher then tries to audit those original paths as that user, receives a permission error, and exits.This blocks every bottle build on the production Linux runner even when the formula and source are valid. Simply loosening checkout permissions would weaken the isolation boundary. The build user needs a path to the exact reviewed sources that it can read but cannot modify, while the original private runner paths stay hidden.
What changed
/usr/bin/findmnttool and reject any mount that is not read-only.This is a Linux continuous-integration isolation fix. The non-Linux launcher path is unchanged. It does not change Kandelo runtime behavior, Node.js/browser behavior, package bytes, or the Application Binary Interface (ABI).
Validation
Run on exact commit
9d3cf759df1710d071605aeca5e9feaac0d5a40d/ tree0b38eee5d1549623a094a9e4f241e2ec9c5354f5:./scripts/dev-shell.sh bash scripts/test-homebrew-patched-launcher.shpassed on macOS; its Linux-only systemd branch skipped as designed../scripts/dev-shell.sh ruby scripts/check-homebrew-publish-workflow-trust.rbpassed../scripts/dev-shell.sh bash scripts/test-homebrew-publish-workflow.shpassed.git diff --checkpassed.Hosted Linux continuous integration remains the production evidence for the systemd path. This source commit is intended for the broad non-ABI release-control batch, where the aggregate gates will run once.