Documentation
¶
Overview ¶
Package note renders a module's Note for the terminal or as JSON.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSON ¶
JSON renders a Note as a JSON object. The blast-radius tier and score are computed here (from the same score.Context the text renderer uses) so the machine shape is self-contained and downstream consumers don't re-derive them.
func SARIF ¶ added in v1.9.0
SARIF renders notes as one SARIF 2.1.0 document. Unlike the NDJSON path, which emits a line per note as it goes, SARIF is a single document with a rules table, so every note has to be in hand before anything is written.
func Sanitize ¶
Sanitize neutralizes control/ANSI sequences and caps length on any string that may originate from untrusted input (a hostile API response or a malicious variable name), so it can't hijack the terminal. Exported for callers that print note-derived text outside Text/JSON (e.g. the summary).
func Text ¶
Text renders a Note as the short human-readable block (summarized: a finding's Detail expansion is omitted).
func TextVerbose ¶
TextVerbose renders a Note and expands each finding's Detail (e.g. the full list of files a secret was also found in) as indented lines beneath it.
Types ¶
This section is empty.