VulnCheck.Feeds.EefCna (VulnCheck v1.0.1)

Copy Markdown View Source

Enriches matched advisories with the original CVE 5.1 records published by the Erlang Ecosystem Foundation CNA (https://cna.erlef.org/cves/<CVE>.json, falling back to the MITRE CVE API).

Converted OSV records drop the function-level programRoutines and modules lists; CVE 5.1 records keep them, together with CVSS metrics and CWE identifiers. Records are cached immutably and refreshed only when the OSV record was modified after the cached copy was fetched.

Summary

Functions

Applies a decoded CVE 5.1 record to an advisory: programRoutines, modules, CVSS metrics, CWE identifiers, OTP constraints and (when the OSV record had none) version ranges.

Fetches and applies the CVE 5.1 record of an advisory. Advisories without a CVE identifier are returned unchanged.

Fetches the CVE 5.1 record for cve_id (primary EEF CNA URL, then MITRE).

Scans cached CVE 5.1 records for git-only products matching any :git dependency's normalized owner/repo slug. Atom-safe (no String.to_atom/1).

Functions

apply_record(advisory, record)

Applies a decoded CVE 5.1 record to an advisory: programRoutines, modules, CVSS metrics, CWE identifiers, OTP constraints and (when the OSV record had none) version ranges.

enrich(advisory, config, opts \\ [])

@spec enrich(VulnCheck.Types.Advisory.t(), VulnCheck.Config.t(), keyword()) ::
  {:ok, VulnCheck.Types.Advisory.t()} | {:error, term()}

Fetches and applies the CVE 5.1 record of an advisory. Advisories without a CVE identifier are returned unchanged.

fetch_record(cve_id, config, opts \\ [])

@spec fetch_record(String.t(), VulnCheck.Config.t(), keyword()) ::
  {:ok, map()} | {:error, term()}

Fetches the CVE 5.1 record for cve_id (primary EEF CNA URL, then MITRE).

Options: :cna_base_url, :mitre_base_url, :modified_at (ISO-8601; forces a refresh when newer than the cached copy) plus VulnCheck.Cache.fetch/4 options.

offline_git_advisories(workspace, config)

@spec offline_git_advisories(VulnCheck.Types.Workspace.t(), VulnCheck.Config.t()) :: [
  VulnCheck.Types.Advisory.t()
]

Scans cached CVE 5.1 records for git-only products matching any :git dependency's normalized owner/repo slug. Atom-safe (no String.to_atom/1).