Documentation
¶
Overview ¶
Package report generates HTML and JSON reports from Suri scan results.
Index ¶
- func RenderDiffHTML(ctx context.Context, st *store.Store, ...) error
- func RenderDiffJSON(ctx context.Context, st *store.Store, baselineID, currentID string, ...) error
- func RenderHTML(ctx context.Context, st *store.Store, scanID, suriVersion string, w io.Writer) error
- func RenderJSON(ctx context.Context, st *store.Store, scanID string, w io.Writer) error
- type JSONDiffMeta
- type JSONDiffReport
- type JSONEvidence
- type JSONFinding
- type JSONReport
- type JSONScanMeta
- type JSONSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderDiffHTML ¶
func RenderDiffHTML(ctx context.Context, st *store.Store, baselineID, currentID, suriVersion string, w io.Writer) error
RenderDiffHTML writes a self-contained HTML diff report comparing two scans.
func RenderDiffJSON ¶
func RenderDiffJSON(ctx context.Context, st *store.Store, baselineID, currentID string, w io.Writer) error
RenderDiffJSON writes a JSON diff report comparing two scans.
Types ¶
type JSONDiffMeta ¶
type JSONDiffMeta struct {
BaselineID string `json:"baseline_id"`
CurrentID string `json:"current_id"`
}
JSONDiffMeta identifies the two scans being compared.
type JSONDiffReport ¶
type JSONDiffReport struct {
DiffMetadata JSONDiffMeta `json:"diff_metadata"`
New []JSONFinding `json:"new"`
Persistent []JSONFinding `json:"persistent"`
Resolved []JSONFinding `json:"resolved"`
GeneratedAt string `json:"generated_at"`
}
JSONDiffReport is the top-level structure for a JSON diff report.
type JSONEvidence ¶
type JSONEvidence struct {
ResponseStatus int `json:"response_status,omitempty"`
ResponseTimeMs int64 `json:"response_time_ms,omitempty"`
RequestBytes string `json:"request_bytes,omitempty"`
ResponseBytes string `json:"response_bytes,omitempty"`
}
JSONEvidence holds raw HTTP evidence with bytes base64-encoded.
type JSONFinding ¶
type JSONFinding struct {
ID int64 `json:"id"`
CheckID string `json:"check_id"`
Severity string `json:"severity"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
URL string `json:"url"`
Parameter string `json:"parameter,omitempty"`
CWE string `json:"cwe,omitempty"`
OWASP string `json:"owasp,omitempty"`
Confidence string `json:"confidence"`
IdentityHash string `json:"identity_hash"`
Evidence *JSONEvidence `json:"evidence,omitempty"`
}
JSONFinding is a single finding in a JSON report.
type JSONReport ¶
type JSONReport struct {
ScanMetadata JSONScanMeta `json:"scan_metadata"`
Findings []JSONFinding `json:"findings"`
Summary JSONSummary `json:"summary"`
GeneratedAt string `json:"generated_at"`
}
JSONReport is the top-level structure for a JSON scan report.
type JSONScanMeta ¶
type JSONScanMeta struct {
ID string `json:"id"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time,omitempty"`
EngagementName string `json:"engagement_name"`
SuriVersion string `json:"suri_version"`
SeedURLs []string `json:"seed_urls"`
ExitStatus *int `json:"exit_status,omitempty"`
ScopeFilePath string `json:"scope_file_path"`
}
JSONScanMeta holds the scan metadata block in a JSON report.
Click to show internal directories.
Click to hide internal directories.