Skip to content

Explain prefix owner trust when using sudo - #508

Merged
MikeMcQuaid merged 1 commit into
mainfrom
package-runtime-trust
Nov 3, 2026
Merged

MikeMcQuaid merged 1 commit into
mainfrom
package-runtime-trust

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member
  • Document the root privileges entrusted to the prefix owner and anyone who can modify Homebrew's code when an administrator invokes sudo brew.
  • Explain that edits to bin/brew and its loaded code take effect before command-specific checks or a switch to another user.
  • Apply the same trust model to commands that only display information and commands that later run as another account.
  • Include an example of a prefix owner adding a deletion command to the brew entry point before its next invocation with sudo.
  • State that changing ownership of selected paths retains trust in accounts that can still modify Homebrew's code.
  • Distinguish Homebrew-managed install, post-install and test execution from installed software that the user subsequently chooses to run.
  • Cover installed software launched through Homebrew commands or registered for automatic startup at the privileges the user requests.

- Document the root privileges entrusted to the prefix owner and anyone
  who can modify Homebrew's code when an administrator invokes
  `sudo brew`.
- Explain that edits to `bin/brew` and its loaded code take effect
  before command-specific checks or a switch to another user.
- Apply the same trust model to commands that only display information
  and commands that later run as another account.
- Include an example of a prefix owner adding a deletion command to the
  `brew` entry point before its next invocation with `sudo`.
- State that changing ownership of selected paths retains trust in
  accounts that can still modify Homebrew's code.
- Distinguish Homebrew-managed install, post-install and test execution
  from installed software that the user subsequently chooses to run.
- Cover installed software launched through Homebrew commands or
  registered for automatic startup at the privileges the user requests.
@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Documentation
    • Clarified that running Homebrew with sudo trusts the prefix owner and anyone who can modify Homebrew code to execute as root, even before command-specific checks or user switching. Changing ownership of selected paths does not remove this trust.
    • Expanded guidance on software launched through Homebrew commands and privileged package commands, and clarified that these commands are not confined by the build sandbox. Also clarified the local-account and administrator-control exclusion.

The security policy clarifies the trust associated with sudo brew and updates guidance on software run through Homebrew commands, requested privileges and the build sandbox.

Changes: Security policy guidance

Layer / File(s) Summary
Threat model and report scope
SECURITY.md
The policy clarifies that sudo brew trusts people who can modify Homebrew code to run code as root. It updates the upstream-software boundary and related exclusions and guidance for software launched through Homebrew commands.
Merge Risk: Minimal · up to 80b07

The security-policy updates are mergeable with no established user or production impact.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title "Explain prefix owner trust when using sudo" matches the main change. The PR adds documentation in SECURITY.md that explains the root trust given to the prefix owner and to anyone who can mo…
Description check Passed The description matches the changeset. It describes the SECURITY.md documentation of root trust for sudo brew, the timing of edits to bin/brew, the effect of changing ownership of paths, and the d…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Explain prefix owner trust when using sudo" matches the main change. The PR adds documentation in SECURITY.md that explains the root trust given to the prefix owner and to anyone who can modify Homebrew's code when running sudo brew. The title is short, specific, and identifies the primary change.

Full details: Description check

Explanation

The description matches the changeset. It describes the SECURITY.md documentation of root trust for sudo brew, the timing of edits to bin/brew, the effect of changing ownership of paths, and the distinction between Homebrew-managed execution and user-run installed software. These points correspond to the raw summary.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 204e98e5-ea54-44aa-8e5e-ebc179ade62e
Commits

Reviewing files that changed from the base of the PR and between 631ab00 and 80b0766.

Files selected for processing: 1
  • SECURITY.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@MikeMcQuaid
MikeMcQuaid enabled auto-merge November 3, 2026 11:00
@MikeMcQuaid
MikeMcQuaid merged commit f2dcf2a into main Nov 3, 2026
28 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the package-runtime-trust branch November 3, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants