fix(runtime): admit macOS Bash toolchain dependencies - #4279
Open
hqhq1025 wants to merge 3 commits into
Open
Conversation
Sandboxed Bash only exposed the Electron runtime root, so Homebrew and Apple Git could be selected from PATH but fail while loading dylibs. Provide a fixed read/execute-only toolchain substrate, make inaccessible Git global config behave as absent, and cover both toolchains with real Seatbelt regression tests.
Astro-Han
reviewed
Aug 30, 2026
Astro-Han
left a comment
Contributor
There was a problem hiding this comment.
Thanks for tackling the reported macOS dependency failures and for keeping the new grants fixed, read/execute-only, and within the existing Seatbelt owner. I found two bounded normal-path gaps below; these are suggestions rather than a Request Changes review, and please push back if I have misunderstood the supported macOS toolchain contract.
AI-assisted review disclosure: Codex ran two independent analysis lanes; Astro-Han independently verified the exact-head code paths, CI, and findings and owns this review.
Resolve inherited DEVELOPER_DIR or the active xcode-select path before compiling the Bash Seatbelt substrate. Tighten the Homebrew root regression assertions and add an alternate Xcode sandbox smoke test. Generated-by: OpenAI Codex
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.
Summary
Sandboxed Bash could select Homebrew or Apple developer tools from
PATH, but macOS Seatbelt exposed only the Electron runtime root. The selected executable then failed while loading dependencies under Homebrewopt/Cellaror the active XcodeContents/SharedFrameworks.This change:
DEVELOPER_DIRor boundedxcode-select -p, including beta, versioned, relocated, and symlink-selected Xcode installations;PATHdirectories, Homebrewetc, and the user's home directory outside the sandbox;sandbox-execcoverage for the reported Homebrewgit logcommand shape, Apple Git startup, and an alternate selected Xcode root.Refs #4267
Verification
libpcre2-8.0.dylibblocked by Seatbelt.npm --workspace @maka/runtime test: 3096 passed, 13 skipped, 0 failed on the clean rerun. One preceding run had an unrelated timing failure inworkspace-executorabort-output capture; the same full suite passed immediately on rerun.npm run build: passed.npm run format:check: passed.npm run lint: passed.npm run typecheck: passed after the completed workspace build.Security
The added roots remain read/execute-only. Package-manager grants are fixed subdirectories rather than the whole Homebrew prefix. The active developer selection is canonicalized before admitting its toolchain root. The implementation does not grant writes, network access, arbitrary
PATHroots, Homebrew configuration directories, or home-directory reads.AI use
Select exactly one:
Tool(s) and scope: OpenAI Codex assisted with reproduction, implementation, tests, and PR drafting; human-reviewed.
Checklist
Does this PR entail a change in behavior?