Documentation
¶
Overview ¶
Package sarif writes a model.ScanResult as SARIF 2.1.0 (https://docs.oasis-open.org/sarif/sarif/v2.1.0/), the format GitHub code scanning and most CI security dashboards consume
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Write ¶
func Write(w io.Writer, res *model.ScanResult) error
Write serializes result as SARIF 2.1.0 with a single run. Every rule referenced by a result is declared once in driver.rules; each result carries a level derived from the finding's severity plus a security-severity score, and a location when the finding names a file.
func WriteMany ¶
func WriteMany(w io.Writer, results []*model.ScanResult) error
WriteMany serializes results as one SARIF document with one run per result - that is what SARIF's runs array is for, and what a command that scans more than one target (known-configs --run) needs so every target ends up in the one report file instead of one truncating the last
Types ¶
This section is empty.