Documentation
¶
Index ¶
- Constants
- type Builder
- func (b *Builder) Build(ctx context.Context) (*Report, error)
- func (b *Builder) Deduplicate(fn DedupFunc) *Builder
- func (b *Builder) Enrich(fn EnrichFunc) *Builder
- func (b *Builder) Findings(findings []Finding) *Builder
- func (b *Builder) ScanDate(t time.Time) *Builder
- func (b *Builder) Target(target string) *Builder
- func (b *Builder) Title(title string) *Builder
- func (b *Builder) Tool(name, version string) *Builder
- type DedupFunc
- type EnrichFunc
- type Evidence
- type Finding
- type Formatter
- type Report
- func (r *Report) DeliverAll(ctx context.Context, sinks []Sink) error
- func (r *Report) FindingsBySeverity(s Severity) []Finding
- func (r *Report) FindingsByStatus(s Status) []Finding
- func (r *Report) Send(ctx context.Context, t Transport, f Formatter) error
- func (r *Report) SeverityCounts() map[Severity]int
- func (r *Report) WriteTo(ctx context.Context, w io.Writer, f Formatter) error
- func (r *Report) WriteToFile(ctx context.Context, path string, f Formatter) error
- type Severity
- type Sink
- type Status
- type Transport
Constants ¶
View Source
const Watermark = "cerberauth/reportx"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder() *Builder
func (*Builder) Deduplicate ¶
func (*Builder) Enrich ¶
func (b *Builder) Enrich(fn EnrichFunc) *Builder
type EnrichFunc ¶
type Finding ¶
type Finding struct {
ID string
Title string
Severity Severity
CVSS31Score float64
CVSS31Vector string
CVSS40Score float64
CVSS40Vector string
CWEID string
CWEName string
OwaspTop10 string
CAPECID string
URL string
Parameter string
Evidence Evidence
Description string
Remediation string
FirstSeen time.Time
LastSeen time.Time
Status Status
FingerprintHash string
Tags []string
Extra map[string]string
}
type Report ¶
type Report struct {
Title string
ScanDate time.Time
ToolName string
ToolVersion string
Target string
Findings []Finding
}
func (*Report) DeliverAll ¶ added in v0.3.0
DeliverAll delivers the report to every sink, each in its own format, so e.g. a terminal display, a JSON file, and an HTTP POST in another format can all happen from a single report. Errors from individual sinks are joined rather than short-circuiting delivery to the rest.
func (*Report) FindingsBySeverity ¶
func (*Report) FindingsByStatus ¶
func (*Report) SeverityCounts ¶
type Sink ¶ added in v0.3.0
type Sink struct {
Formatter Formatter
Writer io.Writer // mutually exclusive with Transport
Transport Transport // mutually exclusive with Writer
}
Sink pairs a Formatter with exactly one delivery target for a report: either a Writer (stdout, a file, ...) or a Transport (HTTP, ...).
Click to show internal directories.
Click to hide internal directories.