# `VulnCheck.Entrypoints.Adapters`
[🔗](https://github.com/Voskan/vulncheck/blob/v1.0.1/lib/vulncheck/entrypoints/adapters.ex#L1)

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

# `result`

```elixir
@type result() :: %{
  configured: %{required(atom()) =&gt; [String.t()]},
  inactive: %{required(String.t()) =&gt; String.t()},
  config_refs: [String.t()],
  config_sites: %{required(String.t()) =&gt; {String.t(), non_neg_integer() | nil}},
  notes: [String.t()]
}
```

# `families`

```elixir
@spec families() :: map()
```

Known adapter families.

# `read_config_files`

```elixir
@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.

# `resolve`

```elixir
@spec resolve(
  VulnCheck.Types.Workspace.t(),
  %{required(String.t()) =&gt; VulnCheck.Types.ModuleSummary.t()},
  VulnCheck.Config.t() | nil
) :: result()
```

Resolves configured adapters and inactive adapter packages.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
