Skip to content

Narrow mkdir_p sandbox write permissions - #23897

Merged
MikeMcQuaid merged 1 commit into
mainfrom
scoped-mkdir-sandbox
Sep 8, 2026
Merged

MikeMcQuaid merged 1 commit into
mainfrom
scoped-mkdir-sandbox

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member
  • Avoid granting writes beside a mkdir_p target when its parent already exists.
  • Preserve the parent allowance when directory creation needs it.

  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Codex with GPT 6 Astra at High effort, with local review and testing.


- Avoid granting writes beside a `mkdir_p` target when its parent
  already exists.
- Preserve the parent allowance when directory creation needs it.
Copilot AI balanced review requested due to automatic review settings September 8, 2026 14:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃煛 Changes recommended

Linux Landlock path preparation can alter guard results and prevent guarded steps from running.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Narrows sandbox permissions for mkdir_p while retaining parent access when required.

Changes:

  • Selects the target or parent based on parent existence.
  • Updates tests and Cask documentation.
File summaries
File Description
Library/Homebrew/install_steps.rb Adjusts sandbox write paths.
Library/Homebrew/test/install_steps_spec.rb Updates expected permissions.
docs/Cask-Cookbook.md Documents permission 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.

Comment thread Library/Homebrew/install_steps.rb
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Sep 8, 2026
Merged via the queue into main with commit f7d7d3e Sep 8, 2026
53 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the scoped-mkdir-sandbox branch September 8, 2026 15:28
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.

3 participants