report

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseReport

type BaseReport struct {
	Version                      string //CVSS version
	Vector                       string //CVSS vector string
	BaseMetrics, BaseMetricValue string //titles
	AVName, AVValue              string //AttackVector
	ACName, ACValue              string //AttackComplexity
	PRName, PRValue              string //PrivilegesRequired
	UIName, UIValue              string //UserInteraction
	SName, SValue                string //Scope
	CName, CValue                string //ConfidentialityImpact
	IName, IValue                string //IntegrityImpact
	AName, AValue                string //AvailabilityImpact
	BaseScore                    string //Base Score
	SeverityName, SeverityValue  string //Severity
}

CVSSReport is dataset for CVSS report

func NewBase

func NewBase(base *metric.Base, os ...ReportOptionsFunc) *BaseReport

NewtBase function reterns new CVSSReport instance

func (*BaseReport) ExportWith

func (rep *BaseReport) ExportWith(r io.Reader) (io.Reader, error)

ExportWithTemplate returns string of CVSS report

func (*BaseReport) ExportWithString

func (rep *BaseReport) ExportWithString(str string) (io.Reader, error)

ExportWithTemplate returns string of CVSS report

type EnvironmentalReport

type EnvironmentalReport struct {
	*TemporalReport                                       //Report of Temporal metrics
	Vector                                         string //CVSS vector string
	EnvironmentalMetrics, EnvironmentalMetricValue string //titles
	CRName, CRValue                                string //Confidentiality Requirement
	IRName, IRValue                                string //Integrity Requirement
	ARName, ARValue                                string //Integrity Requirement
	MAVName, MAVValue                              string //Modified Attack Vector
	MACName, MACValue                              string //Modified Attack Complexity
	MPRName, MPRValue                              string //Modified Privileges Required
	MUIName, MUIValue                              string //Modified User Interaction
	MSName, MSValue                                string //Modified Scope
	MCName, MCValue                                string //Modified Confidentiality Impact
	MIName, MIValue                                string //Modified Integrity Impact
	MAName, MAValue                                string //Modified Availability Impact
	EnvironmentalScore                             string //Environmental Score
	SeverityName, SeverityValue                    string //Severity
}

CVSSReport is dataset for CVSS report

func NewEnvironmental

func NewEnvironmental(environmental *metric.Environmental, os ...ReportOptionsFunc) *EnvironmentalReport

NewEnvironmental function reterns new CVSSReport instance

func (*EnvironmentalReport) ExportWith

func (rep *EnvironmentalReport) ExportWith(r io.Reader) (io.Reader, error)

ExportWithTemplate returns string of CVSS report

func (*EnvironmentalReport) ExportWithString

func (rep *EnvironmentalReport) ExportWithString(str string) (io.Reader, error)

ExportWithTemplate returns string of CVSS report

type ReportOptionsFunc

type ReportOptionsFunc func(*options)

ReportOptionsFunc type is self-referential function type for report.newOptions() function. (functional options pattern)

func WithOptionsLanguage

func WithOptionsLanguage(lang language.Tag) ReportOptionsFunc

WithOptionsLanguage function returns ReportOptionsFunc function value. This function is used in Server.CreateClient method that represents http.Client.

type TemporalReport

type TemporalReport struct {
	*BaseReport                                 //Report of Base metrics
	Vector                               string //CVSS vector string
	TemporalMetrics, TemporalMetricValue string //titles
	EName, EValue                        string //Exploitability
	RLName, RLValue                      string //RemediationLevel
	RCName, RCValue                      string //ReportConfidence
	TemporalScore                        string //Temporal Score
	SeverityName, SeverityValue          string //Severity
}

CVSSReport is dataset for CVSS report

func NewTemporal

func NewTemporal(temporal *metric.Temporal, os ...ReportOptionsFunc) *TemporalReport

NewtBase function reterns new CVSSReport instance

func (*TemporalReport) ExportWith

func (rep *TemporalReport) ExportWith(r io.Reader) (io.Reader, error)

ExportWithTemplate returns string of CVSS report

func (*TemporalReport) ExportWithString

func (rep *TemporalReport) ExportWithString(str string) (io.Reader, error)

ExportWithTemplate returns string of CVSS report

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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