note

package
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: MIT Imports: 8 Imported by: 0

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

func JSON(n module.Note, ctx score.Context) string

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

func SARIF(notes []module.Note, ctx score.Context, version string) string

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

func Sanitize(s string) string

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

func Text(n module.Note) string

Text renders a Note as the short human-readable block (summarized: a finding's Detail expansion is omitted).

func TextVerbose

func TextVerbose(n module.Note) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL