Skip to content

Make network access allowances exclusive - #23635

Merged
p-linnane merged 1 commit into
mainfrom
network-access-allow-list
Aug 23, 2026
Merged

Make network access allowances exclusive#23635
p-linnane merged 1 commit into
mainfrom
network-access-allow-list

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member
  • Treat explicit phases as an allow-list so formulae can name only the phases requiring network access.
  • Preserve no-argument behaviour and scalar or array inputs.

  • 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.

OpenAI Codex 5.6 sol high with local review and testing.


Copilot AI lite review requested due to automatic review settings August 23, 2026 19:58
@MikeMcQuaid
MikeMcQuaid enabled auto-merge August 23, 2026 20:00

@p-linnane p-linnane 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.

Nice!

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.

Pull request overview

Updates the Formula network-access DSL so explicit phases act as an exclusive allow-list while preserving existing inputs.

Changes:

  • Denies unspecified phases.
  • Adds coverage for selective and array-based allowances.
  • Documents the updated behavior.
  • Identified a moderate issue: invalid phases can mutate policy state before raising (3 votes).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Summary
Library/Homebrew/test/formula_spec.rb Tests exclusive phase allowances.
Library/Homebrew/formula.rb Implements the updated policy behavior; validation should occur before mutation.

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

Comment thread Library/Homebrew/formula.rb Outdated
@MikeMcQuaid
MikeMcQuaid disabled auto-merge August 23, 2026 20:09
- Treat explicit phases as an allow-list so formulae can name only the
  phases requiring network access.
- Validate every phase before changing the network access policy.
- Preserve no-argument behaviour and scalar or array inputs.
@MikeMcQuaid
MikeMcQuaid force-pushed the network-access-allow-list branch from 36cacc5 to 92a900c Compare August 23, 2026 20:11
@MikeMcQuaid
MikeMcQuaid enabled auto-merge August 23, 2026 20:11
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Aug 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 23, 2026
@p-linnane
p-linnane added this pull request to the merge queue Aug 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 23, 2026
@p-linnane
p-linnane added this pull request to the merge queue Aug 23, 2026
Merged via the queue into main with commit 0942cac Aug 23, 2026
47 of 48 checks passed
@p-linnane
p-linnane deleted the network-access-allow-list branch August 23, 2026 23:21
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.

4 participants