Documentation ¶
Index ¶
- Constants
- type AttackComplexity
- type AttackVector
- type Availability
- type AvailabilityRequirement
- type BaseMetrics
- type Confidentiality
- type ConfidentialityRequirement
- type EnvironmentalMetrics
- type ExploitCodeMaturity
- type Integrity
- type IntegrityRequirement
- type ModifiedAttackComplexity
- type ModifiedAttackVector
- type ModifiedAvailability
- type ModifiedConfidentiality
- type ModifiedExploitCodeMaturity
- type ModifiedIntegrity
- type ModifiedPrivilegesRequired
- type ModifiedRemediationLevel
- type ModifiedReportConfidence
- type ModifiedScope
- type ModifiedUserInteraction
- type PrivilegesRequired
- type RemediationLevel
- type ReportConfidence
- type Scope
- type TemporalMetrics
- type UserInteraction
- type Vector
- func (v *Vector) Absorb(other Vector)
- func (v *Vector) AbsorbIfDefined(other Vector)
- func (v Vector) BaseScore() float64
- func (v Vector) EnvironmentalScore() float64
- func (v Vector) Equal(o Vector) bool
- func (v Vector) Score() float64
- func (v Vector) String() string
- func (v Vector) TemporalScore() float64
- func (v Vector) Validate() error
Constants ¶
const ( AttackVectorNotdefined ModifiedAttackVector = 0 AttackVectorNotdefinedString string = "X" )
const ( AttackComplexityNotdefined ModifiedAttackComplexity = 0 AttackComplexityNotdefinedString string = "X" )
const ( PrivilegesRequiredNotdefined ModifiedPrivilegesRequired = 0 PrivilegesRequiredNotdefinedString string = "X" )
const ( UserInteractionNotdefined ModifiedUserInteraction = 0 UserInteractionNotdefinedString string = "X" )
const ( ScopeNotdefined ModifiedScope = 0 ScopeNotdefinedString string = "X" )
const ( ConfidentialityNotdefined ModifiedConfidentiality = 0 ConfidentialityNotdefinedString string = "X" )
const ( IntegrityNotdefined ModifiedIntegrity = 0 IntegrityNotdefinedString string = "X" )
const ( AvailabilityNotdefined ModifiedAvailability = 0 AvailabilityNotdefinedString string = "X" )
const ( ModifiedExploitCodeMaturityNotdefined ModifiedExploitCodeMaturity = 0 ModifiedExploitCodeMaturityNotdefinedString string = "X" )
const ( ModifiedRemediationLevelNotdefined ModifiedRemediationLevel = 0 ModifiedRemediationLevelNotdefinedString string = "X" )
const ( ModifiedReportConfidenceNotdefined ModifiedReportConfidence = 0 ModifiedReportConfidenceNotdefinedString string = "X" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttackComplexity ¶
type AttackComplexity int
const ( AttackComplexityLow AttackComplexity = iota + 1 AttackComplexityHigh )
func (AttackComplexity) String ¶
func (ac AttackComplexity) String() string
type AttackVector ¶
type AttackVector int
const ( AttackVectorNetwork AttackVector = iota + 1 AttackVectorAdjecent AttackVectorLocal AttackVectorPhysical )
func (AttackVector) String ¶
func (av AttackVector) String() string
type Availability ¶
type Availability int
const ( AvailabilityHigh Availability = iota + 1 AvailabilityLow AvailabilityNone )
func (Availability) String ¶
func (a Availability) String() string
type AvailabilityRequirement ¶
type AvailabilityRequirement int
const ( AvailabilityRequirementNotdefined AvailabilityRequirement = iota AvailabilityRequirementHigh AvailabilityRequirementMedium AvailabilityRequirementLow )
func (AvailabilityRequirement) String ¶
func (ar AvailabilityRequirement) String() string
type BaseMetrics ¶
type BaseMetrics struct { AttackVector AttackComplexity PrivilegesRequired UserInteraction Scope Confidentiality Integrity Availability }
type Confidentiality ¶
type Confidentiality int
const ( ConfidentialityHigh Confidentiality = iota + 1 ConfidentialityLow ConfidentialityNone )
func (Confidentiality) String ¶
func (c Confidentiality) String() string
type ConfidentialityRequirement ¶
type ConfidentialityRequirement int
const ( ConfidentialityRequirementNotdefined ConfidentialityRequirement = iota ConfidentialityRequirementHigh ConfidentialityRequirementMedium ConfidentialityRequirementLow )
func (ConfidentialityRequirement) String ¶
func (cr ConfidentialityRequirement) String() string
type EnvironmentalMetrics ¶
type EnvironmentalMetrics struct { ConfidentialityRequirement IntegrityRequirement AvailabilityRequirement ModifiedAttackVector ModifiedAttackComplexity ModifiedPrivilegesRequired ModifiedUserInteraction ModifiedScope ModifiedConfidentiality ModifiedIntegrity ModifiedAvailability ModifiedExploitCodeMaturity ModifiedRemediationLevel ModifiedReportConfidence }
type ExploitCodeMaturity ¶
type ExploitCodeMaturity int
const ( ExploitCodeMaturityNotdefined ExploitCodeMaturity = iota ExploitCodeMaturityHigh ExploitCodeMaturityFunctional ExploitCodeMaturityProofOfConcept ExploitCodeMaturityUnproven )
func (ExploitCodeMaturity) String ¶
func (ecm ExploitCodeMaturity) String() string
type IntegrityRequirement ¶
type IntegrityRequirement int
const ( IntegrityRequirementNotdefined IntegrityRequirement = iota IntegrityRequirementHigh IntegrityRequirementMedium IntegrityRequirementLow )
func (IntegrityRequirement) String ¶
func (ir IntegrityRequirement) String() string
type ModifiedAttackComplexity ¶
type ModifiedAttackComplexity AttackComplexity
func (ModifiedAttackComplexity) String ¶
func (mac ModifiedAttackComplexity) String() string
type ModifiedAttackVector ¶
type ModifiedAttackVector AttackVector
func (ModifiedAttackVector) String ¶
func (mav ModifiedAttackVector) String() string
type ModifiedAvailability ¶
type ModifiedAvailability Availability
func (ModifiedAvailability) String ¶
func (ma ModifiedAvailability) String() string
type ModifiedConfidentiality ¶
type ModifiedConfidentiality Confidentiality
func (ModifiedConfidentiality) String ¶
func (mc ModifiedConfidentiality) String() string
type ModifiedExploitCodeMaturity ¶
type ModifiedExploitCodeMaturity ExploitCodeMaturity
func (ModifiedExploitCodeMaturity) String ¶
func (mecm ModifiedExploitCodeMaturity) String() string
type ModifiedIntegrity ¶
type ModifiedIntegrity Integrity
func (ModifiedIntegrity) String ¶
func (mi ModifiedIntegrity) String() string
type ModifiedPrivilegesRequired ¶
type ModifiedPrivilegesRequired PrivilegesRequired
func (ModifiedPrivilegesRequired) String ¶
func (mpr ModifiedPrivilegesRequired) String() string
type ModifiedRemediationLevel ¶
type ModifiedRemediationLevel RemediationLevel
func (ModifiedRemediationLevel) String ¶
func (mrl ModifiedRemediationLevel) String() string
type ModifiedReportConfidence ¶
type ModifiedReportConfidence ReportConfidence
func (ModifiedReportConfidence) String ¶
func (mrc ModifiedReportConfidence) String() string
type ModifiedScope ¶
type ModifiedScope Scope
func (ModifiedScope) String ¶
func (ms ModifiedScope) String() string
type ModifiedUserInteraction ¶
type ModifiedUserInteraction UserInteraction
func (ModifiedUserInteraction) String ¶
func (mui ModifiedUserInteraction) String() string
type PrivilegesRequired ¶
type PrivilegesRequired int
const ( PrivilegesRequiredNone PrivilegesRequired = iota + 1 PrivilegesRequiredLow PrivilegesRequiredHigh )
func (PrivilegesRequired) String ¶
func (pr PrivilegesRequired) String() string
type RemediationLevel ¶
type RemediationLevel int
const ( RemediationLevelNotdefined RemediationLevel = iota RemediationLevelWorkaround RemediationLevelTemporaryFix RemediationLevelOfficialFix )
func (RemediationLevel) String ¶
func (rl RemediationLevel) String() string
type ReportConfidence ¶
type ReportConfidence int
const ( ReportConfidenceNotdefined ReportConfidence = iota ReportConfidenceConfirmed ReportConfidenceReasonable ReportConfidenceUnknown )
func (ReportConfidence) String ¶
func (rc ReportConfidence) String() string
type TemporalMetrics ¶
type TemporalMetrics struct { ExploitCodeMaturity RemediationLevel ReportConfidence }
type UserInteraction ¶
type UserInteraction int
const ( UserInteractionNone UserInteraction = iota + 1 UserInteractionRequired )
func (UserInteraction) String ¶
func (ui UserInteraction) String() string
type Vector ¶
type Vector struct { BaseMetrics TemporalMetrics EnvironmentalMetrics // contains filtered or unexported fields }
Vector represents a CVSSv3 vector, holds all metrics inside (base, temporal and environmental)
func VectorFromString ¶
VectorFromString will parse a string into a Vector, or return an error if it can't be parsed
func (*Vector) Absorb ¶
Absorb will override only metrics in the current vector from the one given which are defined If the other vector specifies only a single metric with all others undefined, the resulting vector will contain all metrics it previously did, with only the new one overriden
func (*Vector) AbsorbIfDefined ¶
AbsorbIfDefined is like Absorb but will not override vector components that are not present in v.
func (Vector) EnvironmentalScore ¶
EnvironmentalScore returns environmental score of the vector
func (Vector) Equal ¶
Equal returns true if o represents the same vector as v.
Note that the definition of equal here means that two vectors with different string representations can still be equal. For instance RL:X is defined as the same as RL:U. From the spec:
Assigning this value indicates there is insufficient information to choose one of the other values, and has no impact on the overall Temporal Score, i.e., it has the same effect on scoring as assigning Unavailable.
func (Vector) String ¶
String returns this vectors representation as a string it shouldn't depend on the order of metrics
func (Vector) TemporalScore ¶
TemporalScore returns temporal score of the vector