vulns: correct upstream fix boundaries and add reviewed overrides - #23736
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
SEMVER terminal ordering and false-valued YAML roots can still produce incorrect or silently disabled override behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Corrects vulnerability fix-boundary semantics and adds opt-in, reviewed advisory overrides.
Changes:
- Distinguishes explicit fixes from
last_affectedandlimitboundaries. - Adds validated formula/advisory overrides and CLI integration.
- Adds tests, Sorbet declarations, and shell completions.
File summaries
| File | Description |
|---|---|
Library/Homebrew/vulns/vulnerability.rb |
Corrects range-terminal handling. |
Library/Homebrew/vulns/match.rb |
Applies overrides during matching and history decisions. |
Library/Homebrew/vulns/advisory_overrides.rb |
Parses and validates overrides. |
Library/Homebrew/test/vulns/vulnerability_spec.rb |
Tests boundary semantics. |
Library/Homebrew/test/vulns/match_spec.rb |
Tests matching overrides and skips. |
Library/Homebrew/test/vulns/advisory_overrides_spec.rb |
Tests override parsing and validation. |
Library/Homebrew/test/dev-cmd/advisory-match_spec.rb |
Tests CLI override behavior. |
Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/advisory_match.rbi |
Declares the new argument accessor. |
Library/Homebrew/dev-cmd/advisory-match.rb |
Adds --overrides integration. |
completions/zsh/_brew |
Adds zsh completion. |
completions/fish/brew.fish |
Adds fish completion. |
completions/bash/brew |
Adds Bash completion. |
Review details
Files not reviewed (1)
- Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/advisory_match.rbi: File type not supported
- Files reviewed: 11/12 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
p-linnane
force-pushed
the
advisory-match-overrides
branch
from
September 1, 2026 22:28
9dcb37b to
09e6f11
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Blank or null YAML currently bypasses the promised fail-closed override validation.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Files not reviewed (1)
- Library/Homebrew/sorbet/rbi/dsl/homebrew/dev_cmd/advisory_match.rbi: File type not supported
- Files reviewed: 11/12 changed files
- Comments generated: 1
- Review effort level: Balanced
Signed-off-by: Patrick Linnane <patrick@linnane.io>
p-linnane
force-pushed
the
advisory-match-overrides
branch
from
September 2, 2026 04:46
09e6f11 to
239d120
Compare
andrew
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
brew advisory-matchtreated any interval's upper bound as the upstream fix version. Only an explicitfixedevent is one:last_affectedis an inclusive affected boundary andlimitis an exclusive terminator.Vulnerability#range_statusnow setsfixed_infromfixedevents only. This currently makes 19BREW-*records in Homebrew/advisory-database reportupstream_fixed_in: 4.0.0for CVE-2026-44405, a paramiko version that was never a fix.The new
--overrides=<file>flag loads reviewed corrections keyed by formula plus upstream advisory id:range_state,upstream_fixed_in(an explicit null suppresses a bad upstream value), and formula-levelskip: true. The schema fails closed. Overrides apply only when the flag is passed; advisory-database starts passing it in a follow-up.brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Claude Code (Opus 5) drafted the implementation and tests; I reviewed the diff, verified the new tests fail without the fix and pass with it, and ran
brew lgtm --onlineplus targetedvulnsandadvisory-matchspecs.