Facade of Stage 2: returns the enriched advisories that affect the locked packages of a workspace.
- Imports
--bundlearchives into the cache (air-gapped CI). - Loads the OSV Hex archive and keeps only advisories whose package is locked at an affected version.
- Enriches those matches (and only those) with EEF CNA CVE 5.1 records, four at a time.
- Falls back to strict backtick signatures from the advisory text when no structured symbol data exists.
- Adds Hex.pm retirement advisories (unless
check_retiredis off) andmix.lockhygiene warnings.
Summary
Functions
Like match_workspace/3 but also returns warnings and feed statistics.
Filters an advisory index down to the advisories affecting locked
packages. The advisory package is rewritten to the lockfile key.
Returns the advisories affecting the workspace.
Types
@type result() :: %{ advisories: [VulnCheck.Types.Advisory.t()], warnings: [String.t()], stats: map() }
Functions
@spec load(VulnCheck.Types.Workspace.t(), VulnCheck.Config.t(), keyword()) :: {:ok, result()} | {:error, term()}
Like match_workspace/3 but also returns warnings and feed statistics.
Options: :http_client, :osv_url, :cna_base_url, :mitre_base_url,
:hex_api_url, :enrich (default true) and :retired (default
config.check_retired).
@spec match( %{required(String.t()) => [VulnCheck.Types.Advisory.t()]}, VulnCheck.Types.Workspace.t() ) :: [VulnCheck.Types.Advisory.t()]
Filters an advisory index down to the advisories affecting locked
packages. The advisory package is rewritten to the lockfile key.
@spec match_workspace(VulnCheck.Types.Workspace.t(), VulnCheck.Config.t(), keyword()) :: {:ok, [VulnCheck.Types.Advisory.t()]} | {:error, term()}
Returns the advisories affecting the workspace.