# `VulnCheck.Report.Formatter`
[🔗](https://github.com/Voskan/vulncheck/blob/v1.0.1/lib/vulncheck/report/formatter.ex#L1)

Contract of report renderers plus helpers shared by them.

# `render`

```elixir
@callback render(VulnCheck.Types.ScanReport.t(), VulnCheck.Config.t()) :: String.t()
```

# `by_verdict`

```elixir
@spec by_verdict([VulnCheck.Types.Finding.t()]) :: %{
  required(atom()) =&gt; [VulnCheck.Types.Finding.t()]
}
```

Findings grouped by verdict, preserving report order.

# `display_id`

```elixir
@spec display_id(VulnCheck.Types.Finding.t()) :: String.t()
```

Identifier shown to humans: the CVE alias when there is one.

# `fix_text`

```elixir
@spec fix_text(VulnCheck.Types.Finding.t()) :: String.t() | nil
```

The specific recommended fixed release, or `nil`.

# `format_score`

```elixir
@spec format_score(number()) :: String.t()
```

Formats a CVSS score with one decimal.

# `help_uri`

```elixir
@spec help_uri(VulnCheck.Types.Finding.t()) :: String.t()
```

Advisory web page for a finding.

# `hop`

```elixir
@spec hop(VulnCheck.Types.TraceHop.t()) :: String.t()
```

Text of a trace hop: the function, followed by what an activation hop
does (`MyApp.Application.start/2 starts Bandit`), or the note alone when
the activation is not a function.

# `location`

```elixir
@spec location(VulnCheck.Types.TraceHop.t()) :: String.t() | nil
```

Location of a trace hop (`file:line`), or `nil`.

# `mfa`

```elixir
@spec mfa(VulnCheck.Types.MFA.t() | nil) :: String.t() | nil
```

Formats an MFA in Elixir or Erlang notation.

# `numbered`

```elixir
@spec numbered([VulnCheck.Types.TraceHop.t()]) :: [
  {VulnCheck.Types.TraceHop.t(), non_neg_integer()}
]
```

Trace hops with their step numbers. The activation hop is step 0, so the
entrypoint is step 1 in every chain.

# `primary_location`

```elixir
@spec primary_location(
  VulnCheck.Types.Finding.t(),
  VulnCheck.Types.Workspace.t() | nil
) ::
  {String.t(), pos_integer()}
```

Location used to annotate a finding. Chooses the first trace hop in the
project source tree, or the package entry in the lockfile.

# `project_file?`

```elixir
@spec project_file?(String.t() | nil) :: boolean()
```

Returns `true` for a path inside the project's own source tree (relative,
outside `deps/` and `_build/`).

# `project_locations`

```elixir
@spec project_locations(
  [VulnCheck.Types.TraceHop.t()],
  VulnCheck.Types.Workspace.t() | nil
) :: [
  VulnCheck.Types.TraceHop.t()
]
```

Trace hops that can be annotated in the project, with normalized paths.

# `reason_label`

```elixir
@spec reason_label(VulnCheck.Types.Finding.reason()) :: String.t()
```

Human description of a reason code.

# `reported`

```elixir
@spec reported([VulnCheck.Types.Finding.t()], boolean()) :: [
  VulnCheck.Types.Finding.t()
]
```

Findings a machine-readable report emits: active actionable findings,
plus unreachable ones when `show_unreachable` is set.

# `security_severity`

```elixir
@spec security_severity(VulnCheck.Types.Finding.t()) :: String.t()
```

Numeric severity used by code scanning dashboards: the CVSS score or, when
unknown, a representative score of the severity band (unknown counts as
critical).

# `severity_label`

```elixir
@spec severity_label(VulnCheck.Types.Advisory.severity()) :: String.t()
```

Upper-case severity label.

# `severity_text`

```elixir
@spec severity_text(VulnCheck.Types.Finding.t(), String.t()) :: String.t()
```

Severity with CVSS score, e.g. `HIGH · CVSS 7.5`.

# `title_id`

```elixir
@spec title_id(VulnCheck.Types.Finding.t()) :: String.t()
```

Identifier with the other names of the vulnerability, for example
`CVE-2026-39804 (GHSA-frh3-6pv6-rc8j)`. Identifiers that only wrap the CVE
(such as `EEF-CVE-…`) are left out.

---

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