Adjust macOS subprocess policy - #23909
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
馃煛 Changes recommended
LaunchServices control tests incorrectly bypass the nested-sandbox guard and can fail or pass spuriously under the new profile.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Tightens macOS sandbox subprocess permissions and documents the resulting cask behaviour.
Changes:
- Restricts Mach service lookups, LaunchServices and Apple Events.
- Adds LaunchServices registration tests.
- Documents sandbox restrictions for cask steps.
File summaries
| File | Description |
|---|---|
Library/Homebrew/extend/os/mac/sandbox.rb |
Adds the Mach service allowlist. |
Library/Homebrew/test/sandbox_spec.rb |
Tests profile and application registration restrictions. |
docs/Cask-Cookbook.md |
Documents macOS sandbox behaviour. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Balanced
馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Define the system services available to macOS subprocesses so command-line installation tasks have a consistent environment. - Keep directory, power, network and certificate services available and document the macOS-specific behaviour for cask steps. - Extend native coverage for application registration and verify the Core Foundation conversions used by the test queries. - Skip live service checks in nested sandboxes, where availability depends on the outer profile. - Validate with `brew lgtm --online` and all 21 native sandbox tests.
MikeMcQuaid
force-pushed
the
macos-service-policy
branch
from
September 9, 2026 16:01
8803df3 to
0190b03
Compare
p-linnane
approved these changes
Sep 9, 2026
|
This change made all my macOS homebrew builds in GitHub workflows hang forever with no output or reason why. |
21 tasks
Member
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Codex with GPT 6 Astra at High effort, with local review and testing.