Repository navigation
Allow reading private sandbox temporary files - #24351
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Temporary-directory read rules Library/Homebrew/sandbox.rb, Library/Homebrew/test/sandbox_shared_spec.rb |
sandbox_environment adds a read allowance for its temporary directory. The capture test checks that reads from the denied parent are blocked and reads from the command’s temporary directory are allowed. |
Priority:
Severity of issue fixed: Medium
Merge Risk: 
Minimal · up to 9e05a
-
No actionable merge-blocking risk remains from the reviewed change.
Pre-merge checks: 
4
-
Full details: Linked Issues check
-
Explanation
The change addresses [
#24348].Sandbox#sandbox_environmentnow grants read access to the temporary directory as a:subpathwhile retaining the existing write and network rules. The new sandbox specification denies the parent directory, verifies that a file in the private temporary directory can be written and read, and verifies that a separate parent file remains unreadable. This covers theunziparchive-read failure and the retained parent restriction.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
Actionable comments posted: 1

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:
453eb451-24fa-484f-aed2-d8307db83b43
Files selected for processing: 2-
Library/Homebrew/sandbox.rbLibrary/Homebrew/test/sandbox_shared_spec.rb
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
-
- Let archive tools read files in the sandbox's temporary directory without granting read access to its parent. - Exercise temporary-file reads and denied parent access in the sandbox. Fixes #24348
ad6e682 to
9e05a54
Compare
Fixes #24348
brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Codex with GPT 6 Astra at Extra High effort, with local review and testing.