MobDev.SecurityScan.HistoryFormatter (mob_dev v0.5.7)

Copy Markdown View Source

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.

Summary

Functions

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

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.

Functions

entry(report, diff, now)

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(path, entry)

@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.