Classifies every matched advisory as :reachable, :potentially_reachable,
:unreachable or :retired (see docs/REACHABILITY_MODEL.md).
Protocol clients (mint, gun, finch) receive data on the
connections the project opens: once a function of a client package is
reachable, the traversal continues from the client's receive functions,
and their chains continue the chain that reaches the client.
Breadth-first traversal from the entrypoints computes the reachable functions and a parent edge for each of them, so the shortest witness trace of any reachable function is rebuilt in time proportional to its length. The traversal first visits everything reachable from the project's own entrypoints and only then continues from the protocol handlers of network daemons, so a function is attributed to a daemon only when no proven chain reaches it. Chains from a root the project does not call itself start with the root's activation hop. A separate traversal excludes speculative edges when they occur in the graph.
Routines and modules of the advisory that belong to other packages or to
Erlang/OTP and Elixir are context only (VulnCheck.Solver.RoutineScope).
Decision order for an advisory of package pkg:
- retired release →
:retired pkgoutside the production closure (development, test or build-time only) →:non_prod_dependency- runtime OTP release outside the affected range →
:otp_version_unaffected - an affected routine is reachable →
:reachablewith a trace (:daemon_call_chainwhen the chain starts at a daemon's protocol handler); an affected module is reachable without routine data → potentially - unused adapter / application not started, with nothing of
pkgreachable →:adapter_not_configured/:otp_app_not_started - soundness boundaries →
:missing_beam_debug_info,:active_network_daemon,:unresolved_dynamic_dispatch,:missing_symbol_granularity - proven absence →
:module_not_loaded/:function_not_called
Summary
Functions
Classifies one advisory against a prepared index.
One warning per dynamic call site that keeps active findings potentially
reachable, naming the affected packages, so that a single unresolved
apply/3 widening many advisories is visible.
Builds the reachability index once for a workspace.
Classifies advisories and returns findings in report order.
Sorts findings: verdict, severity (most severe first), package, advisory id.
Functions
@spec classify(VulnCheck.Types.Advisory.t(), %VulnCheck.Solver.Index{ activations: term(), app_by_package: term(), artifact_issues: term(), atom_modules: term(), atoms_constructed: term(), client_anchors: term(), config: term(), escapes: term(), graph: term(), model: term(), modules_by_package: term(), named_modules: term(), parents: term(), proven_client_anchors: term(), proven_parents: term(), reachable: term(), reachable_modules: term(), reachable_packages: term(), started: term(), workspace: term() }) :: VulnCheck.Types.Finding.t()
Classifies one advisory against a prepared index.
@spec dynamic_dispatch_warnings([VulnCheck.Types.Finding.t()]) :: [String.t()]
One warning per dynamic call site that keeps active findings potentially
reachable, naming the affected packages, so that a single unresolved
apply/3 widening many advisories is visible.
@spec index( VulnCheck.Types.Workspace.t(), VulnCheck.Beam.CallGraph.t(), VulnCheck.Types.EntrypointModel.t(), VulnCheck.Config.t() ) :: %VulnCheck.Solver.Index{ activations: term(), app_by_package: term(), artifact_issues: term(), atom_modules: term(), atoms_constructed: term(), client_anchors: term(), config: term(), escapes: term(), graph: term(), model: term(), modules_by_package: term(), named_modules: term(), parents: term(), proven_client_anchors: term(), proven_parents: term(), reachable: term(), reachable_modules: term(), reachable_packages: term(), started: term(), workspace: term() }
Builds the reachability index once for a workspace.
@spec solve( VulnCheck.Types.Workspace.t(), VulnCheck.Beam.CallGraph.t() | nil, VulnCheck.Types.EntrypointModel.t() | nil, [VulnCheck.Types.Advisory.t()], VulnCheck.Config.t() ) :: [VulnCheck.Types.Finding.t()]
Classifies advisories and returns findings in report order.
@spec sort([VulnCheck.Types.Finding.t()]) :: [VulnCheck.Types.Finding.t()]
Sorts findings: verdict, severity (most severe first), package, advisory id.