Documentation
¶
Overview ¶
Package report renders engine findings as text or JSON.
Index ¶
- Constants
- Variables
- func DepsJSON(w io.Writer, res *deps.ScanResult) error
- func DepsMarkdown(w io.Writer, res *deps.ScanResult)
- func DepsSARIF(w io.Writer, res *deps.ScanResult, artifactURI string) error
- func DepsText(w io.Writer, res *deps.ScanResult, label string)
- func FilterDepsSeverity(res *deps.ScanResult, min string) *deps.ScanResult
- func JSON(w io.Writer, findings []engine.Finding) error
- func Markdown(w io.Writer, findings []engine.Finding)
- func RuleDetail(w io.Writer, r *rules.Rule)
- func RuleList(w io.Writer, rs []*rules.Rule, format string) error
- func SARIF(w io.Writer, findings []engine.Finding, artifactURI string) error
- func Text(w io.Writer, findings []engine.Finding)
Constants ¶
const CommentMarker = "<!-- bumper -->"
CommentMarker is the hidden HTML marker that lets the PR-comment surface find and update its previous comment in place rather than posting a new one.
Variables ¶
var Version = "0.1.0"
Version is the tool version embedded in SARIF output.
Functions ¶
func DepsJSON ¶ added in v1.2.0
func DepsJSON(w io.Writer, res *deps.ScanResult) error
DepsJSON writes the raw scan result as indented JSON (for agents / further tooling).
func DepsMarkdown ¶ added in v1.2.0
func DepsMarkdown(w io.Writer, res *deps.ScanResult)
DepsMarkdown writes a sticky-PR-comment summary (its own marker, so it coexists with the terraform comment).
func DepsSARIF ¶ added in v1.2.0
DepsSARIF writes the scan as a SARIF 2.1.0 log GitHub code scanning ingests; each CVE/MAL id is a rule, each affected package an attributed result.
func DepsText ¶ added in v1.2.0
func DepsText(w io.Writer, res *deps.ScanResult, label string)
DepsText prints a human-readable, severity-sorted dependency scan summary.
func FilterDepsSeverity ¶ added in v1.2.0
func FilterDepsSeverity(res *deps.ScanResult, min string) *deps.ScanResult
FilterDepsSeverity returns a copy keeping only vulns at or above min severity; malicious packages are always kept (treated as critical). Recomputes counts.
func Markdown ¶
Markdown writes a PR-comment body: a hidden marker (so the comment can be updated in place), a severity summary, the critical/high findings inline, and the full list in a collapsible section.
func RuleDetail ¶
RuleDetail prints one rule, including its CEL check (the spec's "reproducible, explainable" pillar — you can see exactly what fires).
func RuleList ¶
RuleList renders a rule set as an aligned text table or JSON. The text table is colored on a terminal: severity by its color, the id in bold, source/resource dimmed. Columns are padded as plain text first, then colored, so the ANSI codes (zero display width) never throw off the alignment.
Types ¶
This section is empty.