Documentation
¶
Overview ¶
Package output renders canonical JSON and derived report formats.
Index ¶
- func FailsThreshold(reader io.Reader, threshold string, failOnUnknown bool) (bool, error)
- func WriteHTML(writer io.Writer, reader io.Reader) error
- func WriteSARIF(writer io.Writer, reader io.Reader) error
- func WriteScanJSON(w io.Writer, input ScanInput) error
- func WriteScanJSONWithEvaluation(w io.Writer, input ScanInput, packs []engine.Pack, evaluated engine.Result) error
- func WriteScanJSONWithRuntime(w io.Writer, input ScanInput, packs []engine.Pack, evaluated engine.Result, ...) error
- func WriteScore(writer io.Writer, reader io.Reader, namespace string) error
- type RuntimeInput
- type ScanInput
- type ScanScope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailsThreshold ¶
FailsThreshold evaluates CI status strictly from canonical finding fields.
func WriteSARIF ¶
WriteSARIF renders a SARIF 2.1.0 compatibility projection from canonical JSON.
func WriteScanJSON ¶
WriteScanJSON writes an indented canonical JSON report.
func WriteScanJSONWithEvaluation ¶
func WriteScanJSONWithEvaluation(w io.Writer, input ScanInput, packs []engine.Pack, evaluated engine.Result) error
WriteScanJSONWithEvaluation writes a report using an already-computed rule engine result. The scan command uses this path so repeatable user packs and producer-specific availability facts are preserved without changing the frozen canonical JSON shape.
func WriteScanJSONWithRuntime ¶ added in v0.2.0
func WriteScanJSONWithRuntime(w io.Writer, input ScanInput, packs []engine.Pack, evaluated engine.Result, runtime RuntimeInput) error
WriteScanJSONWithRuntime preserves the existing declared output assembly and adds only schema-defined runtime evidence. Credentials are never accepted here.
Types ¶
type RuntimeInput ¶ added in v0.2.0
type RuntimeInput struct {
Enabled bool
URL string
Lookback string
DegradedTo string
Verified map[string]map[string]any
}
RuntimeInput supplies optional runtime evidence separately from the frozen ScanInput and resolver interfaces. Keys use namespace/name, within one cluster.
type ScanInput ¶
type ScanInput struct {
GeneratedAt time.Time
ScannerVersion string
ResolverVersion string
ClusterContext string
Scope ScanScope
PermissionSummary []collect.Permission
Inventory normalize.Inventory
WorkloadPostures []resolver.WorkloadResult
}
ScanInput contains the generated scan data needed for canonical JSON output.