API Reference VulnCheck v#1.0.1

Copy Markdown View Source

Modules

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

Walks the Erlang Abstract Format (:raw_abstract_v1) of one module and produces a VulnCheck.Types.ModuleSummary.

Immutable call graph indexed by caller and callee.

Reads compiled .beam files without loading them into the VM.

Command line interface shared by the vulncheck escript and the Mix tasks.

Atomic on-disk cache for advisory feeds and analyzed .beam modules, plus air-gapped bundle export/import.

Scan configuration resolved from command-line flags, .vulncheck.exs and built-in defaults (in that order of precedence).

Incremental reporting for pull requests.

Synthesizes the BEAM execution model of a workspace: the roots of the reachability analysis and the indirect edges created by OTP, frameworks and configuration.

Resolves which implementation of a pluggable adapter family is configured (Tesla, Swoosh, Ecto, Phoenix.PubSub), so a vulnerable adapter package that is merely a transitive dependency can be told apart from the active one.

Synthesizes the call edges that OTP and framework behaviours create at runtime and that never appear as direct calls in the bytecode.

Computes which OTP applications start at boot and their application callback modules, from the .app resource files of the build.

Atom-safe reader for Erlang term files such as .app, .app.src, rebar.lock and rebar.config.

Looks up one advisory and, when the target directory is a project that locks the affected package, its local reachability status.

CVSS helpers: computes CVSS v3.0/v3.1 base scores and CVSS v4.0 scores (VulnCheck.Feeds.CVSS.V4) from vector strings.

CVSS v4.0 scores computed from vector strings, following the FIRST CVSS v4.0 specification (section 8, "CVSS v4.0 Scoring").

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).

Detects retired Hex.pm releases (the mix hex.audit check) and basic supply-chain hygiene problems in mix.lock.

Folds advisories that describe the same vulnerability of the same package into one advisory.

Ingests the OSV.dev Hex ecosystem archive (Hex/all.zip).

Facade of Stage 2: returns the enriched advisories that affect the locked packages of a workspace.

Conservative extraction of machine-usable hints from advisory prose.

Minimal read-only access to the project's Git repository through the git executable.

Minimal, hardened HTTP client built on :httpc and :ssl.

Governed suppressions from .vulncheck.ignore.

One suppression entry.

Safe reader for Elixir-syntax data files (.vulncheck.exs, .vulncheck.ignore, mix.lock, mix.exs, config/*.exs).

CycloneDX 1.6 JSON bill of materials (--sbom or --format cyclonedx).

Contract of report renderers plus helpers shared by them.

GitHub Actions report (--format github).

GitLab Code Quality report (--format gitlab), usually saved as gl-code-quality-report.json and published with artifacts:reports:codequality.

Native JSON report (--format json, schema_version 1.0.0).

GitHub Flavored Markdown report (--format markdown) for pull request comments and audit wikis.

OpenVEX v0.2.0 document (--vex or --format openvex).

SARIF 2.1.0 report (--format sarif) for GitHub Code Scanning and other static analysis dashboards.

Human-oriented console report (--format terminal, the default).

End-to-end scan pipeline

Version comparison and range matching for Hex, Erlang and OTP versions.

Classifies every matched advisory as :reachable, :potentially_reachable, :unreachable or :retired (see docs/REACHABILITY_MODEL.md).

Splits the routines and modules named by an advisory into those that belong to the vulnerable package and context routines from elsewhere.

A security advisory (or a Hex retirement notice) bound to one package.

A directed edge of the call graph.

A source location (file:line) attached to a function call.

A dynamic dispatch site (apply/2,3 or mod.fun(...) with a non-literal module or function) that could not be resolved statically. min_arity is the number of arguments known to be passed when the exact arity is not (apply(m, f, [env | rest]) passes at least one).

A root of the reachability analysis (application callback, configured adapter, extra entrypoint, exported library function, ...).

The BEAM-specific execution model synthesized from .app files, supervision trees, behaviours, framework macros and runtime configuration.

The verdict produced for one advisory against the scanned project.

A Module.function/arity reference stored entirely as strings.

Everything the analyzer needs to know about one compiled module.

A locked dependency of the scanned project.

Hex.pm retirement metadata attached to a specific package release.

The complete result of a scan, consumed by every reporter.

Aggregated counters of a scan report.

One hop of a witness call chain from an entrypoint to a vulnerable routine.

A single affected version interval.

The fully resolved project under audit: project type, target runtime, locked packages with their scopes and the compiled artifact locations.

Stage 1 of the pipeline: loads the project under audit into a VulnCheck.Types.Workspace.

Reader for OTP application resource files (ebin/<app>.app and src/<app>.app.src) built on the atom-safe VulnCheck.ErlTerm parser.

Detects the kind of BEAM project located in a directory.

Normalizes Git dependency URLs into canonical owner/repo slugs without creating atoms.

Parser for Gleam projects: gleam.toml (direct [dependencies] and [dev-dependencies]) and manifest.toml (the resolved package set, either as an inline packages = [...] array or as [[packages]] tables).

Atom-safe parser for mix.lock.

Static (non-evaluating) reader for mix.exs files.

A dependency declared in mix.exs.

Parser for rebar3 rebar.lock files (both the legacy bare list format and the versioned {"1.2.0", [...]}. format with pkg_hash / pkg_hash_ext checksum sections).

A small TOML reader covering the subset used by gleam.toml and Gleam's manifest.toml: tables, arrays of tables, inline tables, arrays (possibly spanning several lines), basic/literal strings, integers, floats and booleans. Keys are kept as strings.

Mix Tasks

Audits the locked dependencies of the current project against OSV.dev and EEF CNA advisories and proves, on the compiled .beam call graph, whether each vulnerable function can run in production.

Prints an advisory (CVE-..., EEF-CVE-... or GHSA-...): summary, CVSS, CWE, references, affected and fixed versions and function-level routines. When the project locks the affected package, the installed version, the reachability verdict and the call trace are shown as well.

Manages the local advisory cache.

Writes a commented .vulncheck.exs tailored to the project: detected frameworks, adapters configured in config/*.exs and release entrypoints.