[Homebrew] Keep the sealed Formula checker across Homebrew re-exec - #96
Merged
Merged
Conversation
Homebrew rebuilds the environment before Formula tests and drops the ordinary WASM_POSIX_XTASK_BIN bridge. Capture the Homebrew-prefixed alias before Formula code runs, validate and freeze its sealed filesystem identity, and explicitly restore that exact path for every Node and Chromium runner. Keep ordinary nonpublisher evaluation inert when the bridge is absent. Cover Homebrew filtering, filesystem tampering, mutable environment poisoning, and every runner API surface.
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
Homebrew removes ordinary environment variables before it runs a Formula's
tests. That removed
WASM_POSIX_XTASK_BIN, even though the trusted publisherhad selected an exact checker for Kandelo's transitional source-build
attestation. The Formula then fell back to the developer shell, which is not
available inside the isolated publisher and caused the Asa bottle test to fail.
What changes
HOMEBREW_KANDELO_XTASK_BINbridge created byAutomattic/kandelo#1082.
canonical, root-owned, read-only, single-link file at the publisher's exact
target/<host>/release/xtasklocation under the trusted Kandelo checkout, andits opened file must still match the inspected file.
WASM_POSIX_XTASK_BINtoall Kandelo Node and browser test runners. Formula environment settings cannot
replace it.
the reviewed publisher commit
ec586b9b3c22034bbbbbac13631e2c4badcb9898.The tests cover all eight runner paths, a real child process, post-load
environment changes, Formula-supplied overrides, and rejection of missing,
writable, empty, misplaced, invalid-host, out-of-root, symlinked, hard-linked,
and non-root-owned checkers.
Validation
brew ruby Kandelo/formula_support/test/kandelo_formula_support_test.rb— 102 runs, 1,658 assertions, no failures or errors
brew ruby Kandelo/test-workflow-trust.rb— passedPYTHONDONTWRITEBYTECODE=1 python3 -m unittest scripts/test_abi42_rollout.py— 41 tests passed
actionlint— passedgit diff --check— passedreference
A live bottle publication is intentionally not part of this PR's local
validation. The publisher's full suite and independent security review are
green; its privileged Ubuntu preflight remains the rollout gate.