Skip to content

vulns: read the advisory index from formulae.brew.sh - #23555

Merged
MikeMcQuaid merged 1 commit into
mainfrom
advisories-data-url
Aug 18, 2026
Merged

vulns: read the advisory index from formulae.brew.sh#23555
MikeMcQuaid merged 1 commit into
mainfrom
advisories-data-url

Conversation

@p-linnane

Copy link
Copy Markdown
Contributor

brew vulns now reads the advisory index from https://formulae.brew.sh/api/advisories.json, which the site build generates from Homebrew/advisory-database's reviewed main. The published file is byte-identical to the committed data/advisories.json it replaces (SHA-256 verified), so this is a URL change only.

Feed downloads also request compressed transfer: the index is 67 MB raw and 14 MB gzip-encoded, and curl falls back to identity for hosts that do not compress.

Once this reaches a stable tag, Homebrew/advisory-database stops committing the generated index; the raw URL keeps working until then.


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

The index is now generated from Homebrew/advisory-database's reviewed
main and published by the formulae.brew.sh site build, so the client
no longer depends on a generated file being committed to that
repository.

Feed downloads also request compressed transfer: the index is 67 MB
raw and 14 MB gzip-encoded, and curl falls back to identity for hosts
that do not compress.

Signed-off-by: Patrick Linnane <patrick@linnane.io>
Copilot AI lite review requested due to automatic review settings August 17, 2026 20:49

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

This PR updates brew vulns feed handling to consume the Homebrew advisory index from the formulae.brew.sh API instead of the advisory-database repository鈥檚 committed JSON, aligning the client with the published API artifact and reducing transfer size via HTTP compression.

Changes:

  • Switch Homebrew::Vulns::AdvisoryDatabase to download from https://formulae.brew.sh/api/advisories.json.
  • Enable compressed HTTP transfer for all CachedFeed downloads by adding --compressed to the curl invocation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Library/Homebrew/vulns/cached_feed.rb Adds --compressed to cached feed downloads to prefer gzip-encoded transfer where available.
Library/Homebrew/vulns/advisory_database.rb Updates advisory index source URL and adjusts documentation comment to match the new publisher/location.

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

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely!

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Aug 18, 2026
Merged via the queue into main with commit 6e899e1 Aug 18, 2026
47 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the advisories-data-url branch August 18, 2026 08:14
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.

3 participants