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.
Sources, all read without executing code: config/config.exs,
config/<env>.exs, config/runtime.exs (quoted with atom-safe
encoding), the configured_adapters option and module literals of the
project's own compiled code (adapter Tesla.Adapter.Mint,
use Ecto.Repo, adapter: ...).
Summary
Functions
Known adapter families.
Reads the configuration files of the project. Returns every module alias mentioned in them with the file (relative to the project) and line where it appears, whether an adapter key had a non-literal value, and notes about unreadable files.
Resolves configured adapters and inactive adapter packages.
Types
Functions
@spec families() :: map()
Known adapter families.
@spec read_config_files(VulnCheck.Types.Workspace.t()) :: {[{String.t(), String.t(), non_neg_integer() | nil}], boolean(), [String.t()]}
Reads the configuration files of the project. Returns every module alias mentioned in them with the file (relative to the project) and line where it appears, whether an adapter key had a non-literal value, and notes about unreadable files.
@spec resolve( VulnCheck.Types.Workspace.t(), %{required(String.t()) => VulnCheck.Types.ModuleSummary.t()}, VulnCheck.Config.t() | nil ) :: result()
Resolves configured adapters and inactive adapter packages.