VulnCheck (VulnCheck v1.0.1)

Copy Markdown View Source

Function-level reachability vulnerability scanner for Elixir, Erlang and Gleam.

VulnCheck matches locked dependencies against OSV.dev and EEF CNA CVE 5.1 advisories, then proves — on compiled .beam call graphs enriched with OTP supervision roots, framework callbacks and runtime adapter configuration — whether the vulnerable functions can actually execute in production.

Summary

Functions

Describes an advisory (CVE-..., EEF-CVE-..., GHSA-...) and, when the project directory locks the affected package, its local reachability verdict and call trace.

Returns true when the report must fail the build under config

Returns the VulnCheck version.

Functions

explain(advisory_id, opts \\ [])

@spec explain(String.t(), keyword()) ::
  {:ok, VulnCheck.Explain.result()} | {:error, term()}

Describes an advisory (CVE-..., EEF-CVE-..., GHSA-...) and, when the project directory locks the affected package, its local reachability verdict and call trace.

Accepts the same options as scan/2, plus :project_dir (default ".") or a :config struct.

{:ok, %{advisories: [advisory | _], local: local}} =
  VulnCheck.explain("CVE-2026-101028", project_dir: "path/to/app")

scan(config_or_path \\ ".", opts \\ [])

@spec scan(VulnCheck.Config.t() | Path.t(), keyword()) ::
  {:ok, VulnCheck.Types.ScanReport.t()} | {:error, term()}

Scans a project.

Accepts a VulnCheck.Config or a project directory plus configuration fields as keyword options (for example env: :prod, offline: true). Feed options such as :http_client are passed to VulnCheck.Scanner.run/2.

{:ok, report} = VulnCheck.scan("path/to/app", offline: true)

should_fail?(report, config)

Returns true when the report must fail the build under config:

  • an active (not suppressed) finding with a verdict selected by fail_on and a severity of at least min_severity (unknown severities count as critical),
  • a retired release when fail_on_retired is set (production dependencies, or security retirements of others under --fail-on any),
  • a policy violation (for example a forbidden new suppression).

version()

@spec version() :: String.t()

Returns the VulnCheck version.