Skip to main content

Module reports

Module reports 

Source
Expand description

Reporting layer.

Responsibilities:

  1. Define the canonical Finding and Severity types used project-wide.
  2. Serialise a completed RunResult to JSON (pretty or NDJSON).
  3. Write reports to stdout, a file, or both.
  4. Emit a human-readable summary to the tracing subscriber.
  5. Optionally flush partial results periodically (streaming mode).

Structs§

CapturedErrorRecord
A serialisable wrapper around CapturedError.
Finding
A single security or informational observation produced by a scanner.
ReportConfig
Controls how the report is written.
ReportDocument
The complete, serialisable report document written to disk / stdout.
ReportMeta
Top-level metadata about the run.
ReportSummary
Counts by severity — useful at a glance without reading all findings.
Reporter
Stateful reporter that can also act as a streaming sink for partial flushes.

Enums§

ReportFormat
Severity
Unified severity scale shared by every scanner.

Functions§

build_document
build_summary
dedup_findings
Deduplicate findings by (url, check, evidence) key, keeping the highest-severity instance for identical evidence payloads while preserving distinct evidence variants for the same check.
exit_code
Returns a UNIX-style exit code appropriate for CI pipelines.
filter_findings
Return only findings whose severity is at or above min_severity.
filter_new_findings
Filter out findings that already exist in the baseline set.
load_baseline_keys
Load a baseline NDJSON file and return a set of (url, check) keys.