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

Ingests the OSV.dev Hex ecosystem archive (`Hex/all.zip`).

The archive is downloaded through `VulnCheck.Cache` (ETag revalidation,
offline support), unpacked in memory with size and entry-count limits, and
every record is converted into one `VulnCheck.Types.Advisory` per affected
Hex package. Records of the same vulnerability (for example the EEF and
GitHub records of one CVE) are merged by `VulnCheck.Feeds.Merge`.

# `cache_file`

```elixir
@spec cache_file() :: String.t()
```

Cache path (relative to the feeds directory) of the archive.

# `default_url`

```elixir
@spec default_url() :: String.t()
```

Default URL of the OSV Hex archive.

# `index`

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

Groups advisories by package name and normalized git repository slug.

# `load`

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

Fetches (or reads from cache) and parses the OSV Hex archive.

Options: `:osv_url`, plus every option accepted by `VulnCheck.Cache.fetch/4`.

# `parse_archive`

```elixir
@spec parse_archive(binary()) ::
  {:ok, [VulnCheck.Types.Advisory.t()]} | {:error, term()}
```

Parses an in-memory ZIP archive of OSV JSON records.

# `parse_record`

```elixir
@spec parse_record(map()) :: [VulnCheck.Types.Advisory.t()]
```

Converts one decoded OSV record into advisories (one per affected Hex package).
Withdrawn records produce no advisories.

# `scope_symbols`

```elixir
@spec scope_symbols(VulnCheck.Types.Advisory.t(), String.t()) ::
  VulnCheck.Types.Advisory.t()
```

Restricts structured symbols to the affected blocks for a locked version.

---

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