report

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reporter

type Reporter struct {
	Reports []*ScanReport `json:"reports"`
}

func NewReporter

func NewReporter() *Reporter

func (*Reporter) AddReport

func (rr *Reporter) AddReport(r *ScanReport)

func (*Reporter) GetReports

func (rr *Reporter) GetReports() []*ScanReport

func (*Reporter) GetVulnerabilityReports

func (rr *Reporter) GetVulnerabilityReports() []*VulnerabilityReport

func (*Reporter) HasHighRiskSeverityVulnerability

func (rr *Reporter) HasHighRiskSeverityVulnerability() bool

func (*Reporter) HasVulnerability

func (rr *Reporter) HasVulnerability() bool

type ScanReport

type ScanReport struct {
	Scans []*VulnerabilityScanAttempt `json:"scans"`
	Vulns []*VulnerabilityReport      `json:"vulnerabilities"`

	StartTime time.Time `json:"start_time"`
	EndTime   time.Time `json:"end_time"`
}

func NewScanReport

func NewScanReport() *ScanReport

func (*ScanReport) AddScanAttempt

func (sc *ScanReport) AddScanAttempt(a *VulnerabilityScanAttempt) *ScanReport

func (*ScanReport) AddVulnerabilityReport

func (sc *ScanReport) AddVulnerabilityReport(vr *VulnerabilityReport) *ScanReport

func (*ScanReport) End

func (sc *ScanReport) End() *ScanReport

func (*ScanReport) GetScanAttempts

func (sc *ScanReport) GetScanAttempts() []*VulnerabilityScanAttempt

func (*ScanReport) GetVulnerabilityReports

func (sc *ScanReport) GetVulnerabilityReports() []*VulnerabilityReport

func (*ScanReport) HasVulnerabilityReport

func (sc *ScanReport) HasVulnerabilityReport() bool

func (*ScanReport) Start

func (sc *ScanReport) Start() *ScanReport

type VulnerabilityReport

type VulnerabilityReport struct {
	SeverityLevel float64 // https://nvd.nist.gov/vuln-metrics/cvss
	Name          string
	Description   string

	Operation *request.Operation
}

func (*VulnerabilityReport) IsHighRiskSeverity

func (vr *VulnerabilityReport) IsHighRiskSeverity() bool

func (*VulnerabilityReport) IsLowRiskSeverity

func (vr *VulnerabilityReport) IsLowRiskSeverity() bool

func (*VulnerabilityReport) IsMediumRiskSeverity

func (vr *VulnerabilityReport) IsMediumRiskSeverity() bool

func (*VulnerabilityReport) SeverityLevelString added in v0.3.1

func (vr *VulnerabilityReport) SeverityLevelString() string

func (*VulnerabilityReport) String

func (vr *VulnerabilityReport) String() string

type VulnerabilityScanAttempt

type VulnerabilityScanAttempt struct {
	Request  *http.Request
	Response *http.Response

	Err error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL