Documentation
¶
Overview ¶
Package cvss provides parsing and scoring with Common Vulunerability Scoring System version 2.0(CVSS v2).
See https://github.com/umisama/go-cvss for examples.
Index ¶
- Constants
- type AccessComplexity
- type AccessVector
- type Authentication
- type CollateralDamagePotential
- type Exploitability
- type Impact
- type Metric
- type RemediationLevel
- type ReportConfidence
- type Requirement
- type TargetDistribution
- type Vectors
- func (m Vectors) AdjustedImpactSubScore() float64
- func (m Vectors) BaseScore() float64
- func (m Vectors) EnvironmentalScore() float64
- func (m Vectors) ExploitabilitySubScore() float64
- func (m Vectors) HasEnvironmentalVectors() bool
- func (m Vectors) HasTemporalVectors() bool
- func (m Vectors) ImpactSubScore() float64
- func (m Vectors) IsValid() bool
- func (m Vectors) Score() float64
- func (m Vectors) String() string
- func (m Vectors) TemporalScore() float64
Constants ¶
const ( // Define all metric factors. // must use these, don't create yourself. AccessVector_Local = AccessVector("L") AccessVector_AdjacentNetwork = AccessVector("A") AccessVector_Network = AccessVector("N") AccessComplexity_High = AccessComplexity("H") AccessComplexity_Medium = AccessComplexity("M") AccessComplexity_Low = AccessComplexity("L") Authentication_Multiple = Authentication("M") Authentication_Single = Authentication("S") Authentication_None = Authentication("N") Impact_Complete = Impact("C") Impact_Partial = Impact("P") Impact_None = Impact("N") Exploitability_Unproven = Exploitability("U") Exploitability_ProofOfConcept = Exploitability("POC") Exploitability_Functional = Exploitability("F") Exploitability_High = Exploitability("H") Exploitability_NotDefined = Exploitability("ND") RemediationLevel_OfficialFix = RemediationLevel("OF") RemediationLevel_TemporaryFix = RemediationLevel("T") RemediationLevel_Workaround = RemediationLevel("W") RemediationLevel_NotDefined = RemediationLevel("ND") ReportConfidence_Unconfirmed = ReportConfidence("UC") ReportConfidence_Uncorroborated = ReportConfidence("UR") ReportConfidence_Confirmed = ReportConfidence("C") ReportConfidence_NotDefined = ReportConfidence("ND") CollateralDamagePotential_None = CollateralDamagePotential("N") CollateralDamagePotential_Low = CollateralDamagePotential("L") CollateralDamagePotential_LowMedium = CollateralDamagePotential("LM") CollateralDamagePotential_MediumHigh = CollateralDamagePotential("MH") CollateralDamagePotential_High = CollateralDamagePotential("H") CollateralDamagePotential_NotDefined = CollateralDamagePotential("ND") TargetDistribution_None = TargetDistribution("N") TargetDistribution_Low = TargetDistribution("L") TargetDistribution_Medium = TargetDistribution("M") TargetDistribution_High = TargetDistribution("H") TargetDistribution_NotDefined = TargetDistribution("ND") Requirement_Low = Requirement("L") Requirement_Medium = Requirement("M") Requirement_High = Requirement("H") Requirement_NotDefined = Requirement("ND") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessComplexity ¶
type AccessComplexity string
AccessComplexity reprecents access complexity in base vectors. implemements Metric interface.
func (AccessComplexity) IsValid ¶
func (m AccessComplexity) IsValid() bool
func (AccessComplexity) String ¶
func (m AccessComplexity) String() string
func (AccessComplexity) StringShort ¶
func (m AccessComplexity) StringShort() string
type AccessVector ¶
type AccessVector string
AccessVector reprecents access vector in base vectors. implemements Metric interface.
func (AccessVector) IsValid ¶
func (m AccessVector) IsValid() bool
func (AccessVector) String ¶
func (m AccessVector) String() string
func (AccessVector) StringShort ¶
func (m AccessVector) StringShort() string
type Authentication ¶
type Authentication string
AccessComplexity reprecents authentication in base vectors. implemements Metric interface.
func (Authentication) IsValid ¶
func (m Authentication) IsValid() bool
func (Authentication) String ¶
func (m Authentication) String() string
func (Authentication) StringShort ¶
func (m Authentication) StringShort() string
type CollateralDamagePotential ¶
type CollateralDamagePotential string
CollateralDamagePotential reprecents temporal damage potential in environmental vectors. implemements Metric interface.
func (CollateralDamagePotential) IsValid ¶
func (m CollateralDamagePotential) IsValid() bool
func (CollateralDamagePotential) String ¶
func (m CollateralDamagePotential) String() string
func (CollateralDamagePotential) StringShort ¶
func (m CollateralDamagePotential) StringShort() string
type Exploitability ¶
type Exploitability string
Exploitability reprecents exploitability in temporal vectors. implemements Metric interface.
func (Exploitability) IsValid ¶
func (m Exploitability) IsValid() bool
func (Exploitability) String ¶
func (m Exploitability) String() string
func (Exploitability) StringShort ¶
func (m Exploitability) StringShort() string
type Impact ¶
type Impact string
AccessComplexity reprecents (confidentiality|integrity|availability) impact in base vectors. implemements Metric interface.
func (Impact) StringShort ¶
type Metric ¶
type Metric interface { IsValid() bool String() string StringShort() string // contains filtered or unexported methods }
Metric reprecents all metric factors.
type RemediationLevel ¶
type RemediationLevel string
RemediationLevel reprecents remediation level in temporal vectors. implemements Metric interface.
func (RemediationLevel) IsValid ¶
func (m RemediationLevel) IsValid() bool
func (RemediationLevel) String ¶
func (m RemediationLevel) String() string
func (RemediationLevel) StringShort ¶
func (m RemediationLevel) StringShort() string
type ReportConfidence ¶
type ReportConfidence string
ReportConfidence reprecents report confidence in temporal vectors. implemements Metric interface.
func (ReportConfidence) IsValid ¶
func (m ReportConfidence) IsValid() bool
func (ReportConfidence) String ¶
func (m ReportConfidence) String() string
func (ReportConfidence) StringShort ¶
func (m ReportConfidence) StringShort() string
type Requirement ¶
type Requirement string
Requirement reprecents (confidentiality|integrity|availability) requirement in environmental vectors. implemements Metric interface.
func (Requirement) IsValid ¶
func (m Requirement) IsValid() bool
func (Requirement) String ¶
func (m Requirement) String() string
func (Requirement) StringShort ¶
func (m Requirement) StringShort() string
type TargetDistribution ¶
type TargetDistribution string
TargetDistribution reprecents target distribution in environmental vectors. implemements Metric interface.
func (TargetDistribution) IsValid ¶
func (m TargetDistribution) IsValid() bool
func (TargetDistribution) String ¶
func (m TargetDistribution) String() string
func (TargetDistribution) StringShort ¶
func (m TargetDistribution) StringShort() string
type Vectors ¶
type Vectors struct { AV AccessVector AC AccessComplexity Au Authentication C Impact I Impact A Impact E Exploitability RL RemediationLevel RC ReportConfidence CDP CollateralDamagePotential TD TargetDistribution CR Requirement IR Requirement AR Requirement }
Vectors reprecents a CVSS vector.
func ParseVectors ¶
ParseVectors create new Vectors object with str. str must valid as CVSS base/temporal/environment vectors.
func (Vectors) AdjustedImpactSubScore ¶
AdjustedImpactSubScore returns m's adjusted impact sub-score in environmental score.
func (Vectors) EnvironmentalScore ¶
EnvironmentalScore returns m's environmental score.
func (Vectors) ExploitabilitySubScore ¶
ExploitabilitySubScore returns m's exploitability sub-score in base score.
func (Vectors) HasEnvironmentalVectors ¶
IsValid returns true if Vectors has environmental vectors.
func (Vectors) HasTemporalVectors ¶
IsValid returns true if Vectors has temporal vectors.
func (Vectors) ImpactSubScore ¶
ImpactSubScore returns m's impact sub-score in base score.
func (Vectors) TemporalScore ¶
TemporalScore returns m's temporal score.