# `MobDev.SecurityScan.HistoryFormatter`
[🔗](https://github.com/genericjam/mob_dev/blob/master/lib/mob_dev/security_scan/history_formatter.ex#L1)

Render a single changelog entry for `SECURITY_HISTORY.md`.

Each entry is one Markdown section with the timestamp as the
heading, severity counts as the lede, and three lists: New
since last scan / Resolved / Still present. Designed to be
appended to the head of `SECURITY_HISTORY.md` so the latest run
is the first thing a reader sees.

# `entry`

```elixir
@spec entry(
  MobDev.SecurityScan.Report.t(),
  MobDev.SecurityScan.Diff.t(),
  DateTime.t()
) :: String.t()
```

Build a single Markdown changelog entry for the given report+diff.
Returns a string with a trailing blank line so successive entries
separate cleanly.

# `prepend_to_file`

```elixir
@spec prepend_to_file(Path.t(), String.t()) :: :ok
```

Append `entry` to the top of `path` (after the file's header, if
any). Creates the file with a default header if it doesn't exist.

---

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