Splits the routines and modules named by an advisory into those that belong to the vulnerable package and context routines from elsewhere.
CVE records often list functions on the vulnerable path that live outside
the package, such as List.delete/2 or a function of another dependency.
Those are reachable in almost any project, so treating them as targets
would prove nothing about the package. A module is part of the package
when:
- a compiled module of that name belongs to the package; or
- no compiled module of that name exists and it is not a module of the
Erlang/OTP or Elixir installation running the scan (unknown modules
stay targets, so missing
.beamfiles never hide an advisory).
Modules compiled for another package or the project, and platform modules, are context.
Summary
Functions
true when module ships with the Erlang/OTP or Elixir installation.
Returns the advisory restricted to the routines and modules of the package, and the context routines.
Splits advisory's routines and modules for the package known by the
names in owners (lockfile key and OTP application), using the compiled
modules of the workspace (%{module_name => ModuleSummary.t()}; may be
empty).
Types
@type split() :: %{ routines: [VulnCheck.Types.MFA.t()], modules: [String.t()], context_routines: [VulnCheck.Types.MFA.t()] }
Functions
true when module ships with the Erlang/OTP or Elixir installation.
@spec scope(VulnCheck.Types.Advisory.t(), [String.t()], %{ required(String.t()) => VulnCheck.Types.ModuleSummary.t() }) :: {VulnCheck.Types.Advisory.t(), [VulnCheck.Types.MFA.t()]}
Returns the advisory restricted to the routines and modules of the package, and the context routines.
@spec split(VulnCheck.Types.Advisory.t(), [String.t()], %{ required(String.t()) => VulnCheck.Types.ModuleSummary.t() }) :: split()
Splits advisory's routines and modules for the package known by the
names in owners (lockfile key and OTP application), using the compiled
modules of the workspace (%{module_name => ModuleSummary.t()}; may be
empty).