Documentation
¶
Overview ¶
Package report provides rendering and export utilities for Redactyl findings, including human-readable tables and SARIF 2.1.0 output.
internal/report/sarif.go
Index ¶
- Constants
- func FilterNewFindings(findings []types.Finding, base Baseline) []types.Finding
- func FindingKey(f types.Finding) string
- func IsBaselined(f types.Finding, items map[string]bool) bool
- func LegacyFindingKey(f types.Finding) string
- func PrintTable(w io.Writer, findings []types.Finding, opts PrintOptions)
- func PrintText(w io.Writer, findings []types.Finding, opts PrintOptions)
- func SaveBaseline(path string, findings []types.Finding) error
- func ShouldFail(findings []types.Finding, failOn string) bool
- func WriteSARIF(w io.Writer, findings []types.Finding) error
- func WriteSARIFWithStats(w io.Writer, findings []types.Finding, artifactStats map[string]int) error
- type Baseline
- type PrintOptions
Constants ¶
const FingerprintMetadataKey = "redactyl_fingerprint"
Variables ¶
This section is empty.
Functions ¶
func FilterNewFindings ¶
func FindingKey ¶
FindingKey returns a stable fingerprint for a finding without storing raw match text. It prefers a precomputed fingerprint in metadata when present.
func IsBaselined ¶
IsBaselined checks both current and legacy baseline key formats.
func LegacyFindingKey ¶
LegacyFindingKey returns the pre-1.0.1 baseline key format.
func PrintTable ¶
func PrintTable(w io.Writer, findings []types.Finding, opts PrintOptions)
PrintTable renders findings as a formatted table using tablewriter and emits a summary footer containing counts and optional duration/files scanned.
func PrintText ¶
func PrintText(w io.Writer, findings []types.Finding, opts PrintOptions)
PrintText renders findings as columnar text output and emits a summary footer containing counts and optional duration/files scanned.
func WriteSARIF ¶
WriteSARIF writes findings as SARIF 2.1.0 to the provided writer.