Skip to content

Handle unresolved Cask effective groups - #24146

Merged
MikeMcQuaid merged 1 commit into
mainfrom
cask-unresolved-group
Oct 1, 2026
Merged

MikeMcQuaid merged 1 commit into
mainfrom
cask-unresolved-group

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member
  • Use the effective GID when AD/mobile group records are unavailable.
  • Avoid granting group writes to staff or unresolved Caskroom groups.

Fixes #24140


  • 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.1 Sol at Extra High effort, with local review and testing.


Copilot AI lite review requested due to automatic review settings October 1, 2026 08:15

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.

Copilot review overview

🟡 Changes recommended

The application spec has unresolved Linux expectations and cache-reset issues.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Updates Caskroom group handling for unresolved effective GIDs and prevents unsafe group-write permissions.

Changes:

  • Adds numeric GID fallback and ownership checks.
  • Restricts permissions for unresolved or shared groups.
  • Adds regression coverage.
File Summary
Library/​Homebrew/​test/​cask/​caskroom_spec.rb Tests unresolved and numeric group handling.
Library/​Homebrew/​test/​cask/​artifact/​app_spec.rb Adds unresolved-GID coverage; requires cache reset and platform-specific expectations.
Library/​Homebrew/​cask/​caskroom.rb Implements numeric GID fallback and safe permission handling.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

- Preserve the effective GID for missing AD/mobile group records.
- Prevent group writes for `staff` and unresolved Caskroom groups.

Fixes #24140
@MikeMcQuaid
MikeMcQuaid force-pushed the cask-unresolved-group branch from bad5b24 to d691306 Compare October 1, 2026 10:21
@MikeMcQuaid
MikeMcQuaid enabled auto-merge October 1, 2026 11:45
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Oct 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 1, 2026
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Oct 1, 2026
Merged via the queue into main with commit d6ca355 Oct 1, 2026
51 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the cask-unresolved-group branch October 1, 2026 14:01
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.

Cask operations fail with can't find group for <gid> for AD/mobile accounts

3 participants

⌂ 换网址