CONTRIBUTING: describe reviewing source: matched candidates - #28
Merged
Conversation
brew advisory-match (Homebrew/brew#23329) produces automated PRs adding records with database_specific.source: matched. Document what the strategy/confidence/upstream_evidence and range_state/upstream_fixed_in/ resource fields mean and give a review checklist: verify the evidence points at this formula's actual upstream, rule out distro-specific CVEs, spot-check the fixed boundary against homebrew-core history, and handle the known false-positive sources (stale CPANSA ranges, conflicting OSV alias ranges). Note that matched records must not overwrite source: generated ones.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates contributor documentation to support incoming automated PRs produced by brew advisory-match, clarifying how to review and validate “matched” candidate advisory records before merging.
Changes:
- Describes the new third advisory source:
database_specific.source: "matched"candidate records. - Documents the meaning of
strategy/confidence/upstream_evidenceandrange_state/upstream_fixed_in/resourcefields. - Adds a reviewer checklist for common false positives and boundary verification against
homebrew-corehistory.
Comments suppressed due to low confidence (1)
CONTRIBUTING.md:56
- Similarly, inline examples like
range_state: "fixed"/range_state: "affected"look like YAML rather than JSON. Since this section is documenting JSON keys/values, prefer JSON-style"range_state": "..."for clarity.
- If `range_state: "fixed"`, the `fixed` boundary in `ranges` is the `pkg_version` at which Homebrew first shipped the fix. `brew advisory-match` derives this by walking `homebrew-core` history; spot-check it against `git log -p -- Formula/<letter>/<name>.rb` in a `homebrew-core` checkout and correct it in the PR if wrong. The corrected value is preserved on subsequent regenerations.
- If `range_state: "affected"` with a `resource`, `brew info <formula> --json=v2 | jq '.formulae[0].resources[] | select(.name == "<resource>") | .version'` confirms the pinned resource version is below `upstream_fixed_in`. Known false-positive sources are stale CPANSA ranges and OSV records where one alias (often a PYSEC id) has an open-ended range while another has a bounded one.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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-match(Homebrew/brew#23329) will produce automated PRs adding records withdatabase_specific.source: "matched". This adds a section explaining what thestrategy/confidence/upstream_evidenceandrange_state/upstream_fixed_in/resourcefields mean, and a review checklist covering: verifying the evidence points at this formula's actual upstream, ruling out distro-specific CVEs, spot-checking thefixedboundary againsthomebrew-corehistory, the known false-positive sources found during calibration (stale CPANSA ranges, conflicting OSV alias ranges), and not overwritingsource: generatedrecords.Can merge independently of #27; both are prep for the nightly ingest workflow which needs Homebrew/brew#23329 in a release first.