Documentation
¶
Overview ¶
Package report formats scan results for humans (colored text) and machines (JSON), and centralizes exit-code decisions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Finding ¶
type Finding struct {
Severity Severity `json:"severity"`
File string `json:"file"`
Line int `json:"line,omitempty"`
Rule string `json:"rule"`
Key string `json:"key,omitempty"` // the env key for secretlike-value findings
Message string `json:"message"`
}
Finding is a single issue (or informational OK) discovered during a scan.
type Result ¶
Result is the full output of a scan, ready to be rendered.
func (Result) ExitCode ¶
ExitCode returns 1 if the highest finding severity meets or exceeds minSeverity, else 0. This is what backs --strict / severity_exit_code.
func (Result) HighestSeverity ¶
HighestSeverity returns the most severe finding in the result, or SeverityOK if there are none.