# `VulnCheck.Feeds.Store`
[🔗](https://github.com/Voskan/vulncheck/blob/v1.0.1/lib/vulncheck/feeds/store.ex#L1)

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

1. Imports `--bundle` archives into the cache (air-gapped CI).
2. Loads the OSV Hex archive and keeps only advisories whose package is
   locked at an affected version.
3. Enriches those matches (and only those) with EEF CNA CVE 5.1 records,
   four at a time.
4. Falls back to strict backtick signatures from the advisory text when no
   structured symbol data exists.
5. Adds Hex.pm retirement advisories (unless `check_retired` is off) and
   `mix.lock` hygiene warnings.

# `result`

```elixir
@type result() :: %{
  advisories: [VulnCheck.Types.Advisory.t()],
  warnings: [String.t()],
  stats: map()
}
```

# `load`

```elixir
@spec load(VulnCheck.Types.Workspace.t(), VulnCheck.Config.t(), keyword()) ::
  {:ok, result()} | {:error, term()}
```

Like `match_workspace/3` but also returns warnings and feed statistics.

Options: `:http_client`, `:osv_url`, `:cna_base_url`, `:mitre_base_url`,
`:hex_api_url`, `:enrich` (default `true`) and `:retired` (default
`config.check_retired`).

# `match`

```elixir
@spec match(
  %{required(String.t()) =&gt; [VulnCheck.Types.Advisory.t()]},
  VulnCheck.Types.Workspace.t()
) ::
  [VulnCheck.Types.Advisory.t()]
```

Filters an advisory index down to the advisories affecting locked
packages. The advisory `package` is rewritten to the lockfile key.

# `match_workspace`

```elixir
@spec match_workspace(VulnCheck.Types.Workspace.t(), VulnCheck.Config.t(), keyword()) ::
  {:ok, [VulnCheck.Types.Advisory.t()]} | {:error, term()}
```

Returns the advisories affecting the workspace.

---

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