# `Visualize.Audit.Advisories`
[🔗](https://github.com/dcoai/Visualize/blob/v0.8.3/audit/visualize/audit/advisories.ex#L1)

No dependency carries an advisory (spec/12 §3, #782, D-207).

Runs Hex's own `mix hex.audit` in the root project and in `examples/`, one OS process
each, so both `mix.lock` files are held to the security advisories and retirements Hex
publishes with its registry. A project fails when its audit exits non-zero.

What a project accepts is the allowlist `audit/advisories_allowlist.exs`. Each entry
names its project (`:library` or `:examples`), exactly one of `advisory:` (an id, primary
or alias, as `mix hex.audit` matches it) and `retired:` (`"name"` or `"name@version"`),
and its reason. A project is handed only its own entries, through `HEX_IGNORE_ADVISORIES`
and `HEX_IGNORE_RETIREMENTS`, which are always set so the caller's environment allows
nothing. Once a project's audit is green each of its entries is dropped in turn and the
audit run again: an entry whose absence leaves it green is stale, and fails too.

# `ignores`

```elixir
@type ignores() :: %{advisories: [String.t()], retirements: [String.t()]}
```

# `runner`

```elixir
@type runner() :: (dir :: Path.t(), ignores :: ignores(), quiet? :: boolean() -&gt;
               non_neg_integer())
```

Runs `mix hex.audit` in a directory with the given ignores; returns its exit.

# `run`

```elixir
@spec run(Path.t()) :: [String.t()]
```

Every problem under `root`, one line each; `[]` when there is none.

---

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