Documentation
¶
Overview ¶
Package skald renders scan results and verdicts into evidence: a JSON summary and merged SARIF. A skald is the poet who records deeds — here, the record of a scan.
Index ¶
- func MergedSARIF(run engine.Result) sarif.Report
- func RenderJSON(w io.Writer, release saga.Release, run engine.Result, verdict norn.Result, ...) error
- func RenderJSONWith(w io.Writer, release saga.Release, run engine.Result, verdict norn.Result, ...) error
- func RenderJSONWithFeeds(w io.Writer, release saga.Release, run engine.Result, verdict norn.Result, ...) error
- func WriteSARIF(w io.Writer, run engine.Result) error
- func WriteSARIFWith(w io.Writer, run engine.Result, opts sarif.MarshalOptions) error
- type FeedProvenance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MergedSARIF ¶
MergedSARIF combines all controls' reports into one SARIF report.
func RenderJSON ¶
func RenderJSON(w io.Writer, release saga.Release, run engine.Result, verdict norn.Result, minPriority string) error
RenderJSON writes a JSON evidence summary combining the run result and the verdict. Controls are emitted in name order for stable output. When minPriority is non-empty (e.g. "P2"), a ranked `findings` list of findings at or above that band is included; priority counts are always included when the run was prioritized.
func RenderJSONWith ¶ added in v0.35.0
func RenderJSONWith(w io.Writer, release saga.Release, run engine.Result, verdict norn.Result, minPriority string, opts sarif.MarshalOptions) error
RenderJSONWith is RenderJSON with marshalling options; Compact drops the indentation.
func RenderJSONWithFeeds ¶ added in v0.56.0
func RenderJSONWithFeeds(w io.Writer, release saga.Release, run engine.Result, verdict norn.Result, minPriority string, feeds []FeedProvenance, opts sarif.MarshalOptions) error
RenderJSONWithFeeds is RenderJSONWith plus the exploitability datasets the run used.
func WriteSARIF ¶
WriteSARIF writes the merged run results as SARIF 2.1.0 JSON.
func WriteSARIFWith ¶ added in v0.35.0
WriteSARIFWith is WriteSARIF with marshalling options.
Types ¶
type FeedProvenance ¶ added in v0.56.0
type FeedProvenance struct {
Name string `json:"name"`
URL string `json:"url,omitempty"`
FetchedAt *time.Time `json:"fetchedAt,omitempty"`
SHA256 string `json:"sha256,omitempty"`
Stale bool `json:"stale,omitempty"`
}
FeedProvenance is one exploitability dataset as a run saw it: where it came from, when, and whether it was already older than the run allowed for.