Harden ownership and permissions of cask apps - #24003
Conversation
There was a problem hiding this comment.
馃煛 Changes recommended
The system-directory guard still classifies user-local absolute paths as system paths, stripping their write permissions.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Restricts write permissions on cask apps installed in system directories.
Changes:
- Removes group and other write bits recursively.
- Adds permission-preservation and restriction tests.
File summaries
| File | Description |
|---|---|
Library/Homebrew/cask/artifact/app.rb |
Tightens installed app permissions. |
Library/Homebrew/test/cask/artifact/app_spec.rb |
Tests permission handling. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced (auto)
Note
Copilot is running an experiment and ran this review at Balanced.
馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
8ad3e4f to
7a544d4
Compare
- Remove group and other write permissions from every app and use the platform's default cask group. - Add read and execute access for all users only in system directories, preserving existing read and execute permissions elsewhere. - Avoid following symlinks when changing groups and request `sudo` only if the unprivileged change fails. Fixes #24002
7a544d4 to
a814f17
Compare
There was a problem hiding this comment.
馃數 Needs a closer look
Recursive cross-platform ownership and permission changes require final human validation.
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Balanced (auto)
Note
Copilot is running an experiment and ran this review at Balanced.
|
Hey! I have this env variable set |
|
@ricardojoaoreis will be fixed by #24011 |
|
Thanks @MikeMcQuaid! And thanks for the amazing work all these years! |
sudoonly if the unprivileged change fails.Fixes #24002
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.