Ingests the OSV.dev Hex ecosystem archive (Hex/all.zip).
The archive is downloaded through VulnCheck.Cache (ETag revalidation,
offline support), unpacked in memory with size and entry-count limits, and
every record is converted into one VulnCheck.Types.Advisory per affected
Hex package. Records of the same vulnerability (for example the EEF and
GitHub records of one CVE) are merged by VulnCheck.Feeds.Merge.
Summary
Functions
Cache path (relative to the feeds directory) of the archive.
Default URL of the OSV Hex archive.
Groups advisories by package name and normalized git repository slug.
Fetches (or reads from cache) and parses the OSV Hex archive.
Parses an in-memory ZIP archive of OSV JSON records.
Converts one decoded OSV record into advisories (one per affected Hex package). Withdrawn records produce no advisories.
Restricts structured symbols to the affected blocks for a locked version.
Functions
@spec cache_file() :: String.t()
Cache path (relative to the feeds directory) of the archive.
@spec default_url() :: String.t()
Default URL of the OSV Hex archive.
@spec index([VulnCheck.Types.Advisory.t()]) :: %{ required(String.t()) => [VulnCheck.Types.Advisory.t()] }
Groups advisories by package name and normalized git repository slug.
@spec load(VulnCheck.Config.t(), keyword()) :: {:ok, [VulnCheck.Types.Advisory.t()], VulnCheck.Cache.fetch_status()} | {:error, term()}
Fetches (or reads from cache) and parses the OSV Hex archive.
Options: :osv_url, plus every option accepted by VulnCheck.Cache.fetch/4.
@spec parse_archive(binary()) :: {:ok, [VulnCheck.Types.Advisory.t()]} | {:error, term()}
Parses an in-memory ZIP archive of OSV JSON records.
@spec parse_record(map()) :: [VulnCheck.Types.Advisory.t()]
Converts one decoded OSV record into advisories (one per affected Hex package). Withdrawn records produce no advisories.
@spec scope_symbols(VulnCheck.Types.Advisory.t(), String.t()) :: VulnCheck.Types.Advisory.t()
Restricts structured symbols to the affected blocks for a locked version.