Skip to content

New data source: Homebrew #5659

Description

@andrew

Homebrew publishes OSV-format advisory records at https://github.com/Homebrew/advisory-database under the Homebrew ecosystem with BREW- ids and pkg:brew purls. This issue tracks onboarding it as an osv.dev data source.

For the ecosystem/purl PR: pkg:brew maps to Homebrew with no namespace (EcosystemPURL('brew', None)). Version comparison is Homebrew's PkgVersion: an upstream version segment ordered by Homebrew's Version class, then a numeric _N revision suffix (e.g. 1.81.6_5 < 1.81.6_6 < 1.82.0). There isn't a Homebrew comparator in third_party/univers or osv-scalibr/semantic today so this needs a small new implementation; the _sort_key shape is (version_tokens, revision_int). Happy to also add the Go-side entries in go/osv/ecosystem/ and go/purl/ in the same PR if that's preferred over Python-only.

Proposed source_test.yaml entry:

- name: homebrew
  type: 0
  repo_url: https://github.com/Homebrew/advisory-database
  db_prefix: [BREW]
  accepted_ecosystems: [Homebrew]
  human_link: https://github.com/Homebrew/advisory-database/blob/main/advisories/
  link: https://raw.githubusercontent.com/Homebrew/advisory-database/main/advisories/
  directory_path: advisories
  extension: '.json'

Background: https://github.com/orgs/Homebrew/discussions/6869. pkg:brew was registered in package-url/purl-spec#796.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions