Documentation ¶
Index ¶
- Variables
- type AttackComplexity
- type AttackVector
- type AvailabilityImpact
- type AvailabilityRequirement
- type Base
- type ConfidentialityImpact
- type ConfidentialityRequirement
- type Environmental
- func (em *Environmental) BaseMetrics() *Base
- func (em *Environmental) Decode(vector string) (*Environmental, error)
- func (em *Environmental) Encode() (string, error)
- func (em *Environmental) GetError() error
- func (em *Environmental) Score() float64
- func (em *Environmental) Severity() Severity
- func (em *Environmental) TemporalMetrics() *Temporal
- type Exploitability
- type IntegrityImpact
- type IntegrityRequirement
- type Metrics
- type ModifiedAttackComplexity
- type ModifiedAttackVector
- type ModifiedAvailabilityImpact
- type ModifiedConfidentialityImpact
- type ModifiedIntegrityImpact
- type ModifiedPrivilegesRequired
- type ModifiedScope
- type ModifiedUserInteraction
- type PrivilegesRequired
- type RemediationLevel
- type ReportConfidence
- type Scope
- type Severity
- type Temporal
- type UserInteraction
- type Version
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var AvailabilityRequirementMap = map[AvailabilityRequirement]string{ AvailabilityRequirementNotDefined: "X", AvailabilityRequirementLow: "L", AvailabilityRequirementMedium: "M", AvailabilityRequirementHigh: "H", }
var AvailabilityRequirementValueMap = map[AvailabilityRequirement]float64{ AvailabilityRequirementNotDefined: 1, AvailabilityRequirementLow: 0.5, AvailabilityRequirementMedium: 1, AvailabilityRequirementHigh: 1.5, }
var ConfidentialityRequirementMap = map[ConfidentialityRequirement]string{ ConfidentialityRequirementNotDefined: "X", ConfidentialityRequirementLow: "L", ConfidentialityRequirementMedium: "M", ConfidentialityRequirementHigh: "H", }
var ConfidentialityRequirementValueMap = map[ConfidentialityRequirement]float64{ ConfidentialityRequirementNotDefined: 1, ConfidentialityRequirementLow: 0.5, ConfidentialityRequirementMedium: 1, ConfidentialityRequirementHigh: 1.5, }
var IntegrityRequirementMap = map[IntegrityRequirement]string{ IntegrityRequirementNotDefined: "X", IntegrityRequirementLow: "L", IntegrityRequirementMedium: "M", IntegrityRequirementHigh: "H", }
var IntegrityRequirementValueMap = map[IntegrityRequirement]float64{ IntegrityRequirementNotDefined: 1, IntegrityRequirementLow: 0.5, IntegrityRequirementMedium: 1, IntegrityRequirementHigh: 1.5, }
var ModifiedAttackComplexityMap = map[ModifiedAttackComplexity]string{ ModifiedAttackComplexityNotDefined: "X", ModifiedAttackComplexityHigh: "H", ModifiedAttackComplexityLow: "L", }
var ModifiedAttackComplexityValueMap = map[ModifiedAttackComplexity]float64{ ModifiedAttackComplexityNotDefined: 0, ModifiedAttackComplexityHigh: 0.44, ModifiedAttackComplexityLow: 0.77, }
var ModifiedAttackVectorMap = map[ModifiedAttackVector]string{ ModifiedAttackVectorNotDefined: "X", ModifiedAttackVectorPhysical: "P", ModifiedAttackVectorLocal: "L", ModifiedAttackVectorAdjacent: "A", ModifiedAttackVectorNetwork: "N", }
var ModifiedAttackVectorValueMap = map[ModifiedAttackVector]float64{ ModifiedAttackVectorNotDefined: 0, ModifiedAttackVectorPhysical: 0.20, ModifiedAttackVectorLocal: 0.55, ModifiedAttackVectorAdjacent: 0.62, ModifiedAttackVectorNetwork: 0.85, }
var ModifiedAvailabilityImpactMap = map[ModifiedAvailabilityImpact]string{ ModifiedAvailabilityImpactNotDefined: "X", ModifiedAvailabilityImpactNone: "N", ModifiedAvailabilityImpactLow: "L", ModifiedAvailabilityImpactHigh: "H", }
var ModifiedAvailabilityImpactValueMap = map[ModifiedAvailabilityImpact]float64{ ModifiedAvailabilityImpactNotDefined: 0.00, ModifiedAvailabilityImpactNone: 0.00, ModifiedAvailabilityImpactLow: 0.22, ModifiedAvailabilityImpactHigh: 0.56, }
var ModifiedConfidentialityImpactMap = map[ModifiedConfidentialityImpact]string{ ModifiedConfidentialityImpactNotDefined: "X", ModifiedConfidentialityImpactNone: "N", ModifiedConfidentialityImpactLow: "L", ModifiedConfidentialityImpactHigh: "H", }
var ModifiedConfidentialityImpactValueMap = map[ModifiedConfidentialityImpact]float64{ ModifiedConfidentialityImpactNotDefined: 0.00, ModifiedConfidentialityImpactNone: 0.00, ModifiedConfidentialityImpactLow: 0.22, ModifiedConfidentialityImpactHigh: 0.56, }
var ModifiedIntegrityImpactMap = map[ModifiedIntegrityImpact]string{ ModifiedIntegrityImpactNotDefined: "X", ModifiedIntegrityImpactNone: "N", ModifiedIntegrityImpactLow: "L", ModifiedIntegrityImpactHigh: "H", }
var ModifiedIntegrityImpactValueMap = map[ModifiedIntegrityImpact]float64{ ModifiedIntegrityImpactNotDefined: 0.00, ModifiedIntegrityImpactNone: 0.00, ModifiedIntegrityImpactLow: 0.22, ModifiedIntegrityImpactHigh: 0.56, }
var ModifiedPrivilegesRequiredMap = map[ModifiedPrivilegesRequired]string{ ModifiedPrivilegesRequiredNotDefined: "X", ModifiedPrivilegesRequiredHigh: "H", ModifiedPrivilegesRequiredLow: "L", ModifiedPrivilegesRequiredNone: "N", }
var ModifiedPrivilegesRequiredWithCValueMap = map[ModifiedPrivilegesRequired]float64{ ModifiedPrivilegesRequiredNotDefined: 0, ModifiedPrivilegesRequiredHigh: 0.50, ModifiedPrivilegesRequiredLow: 0.68, ModifiedPrivilegesRequiredNone: 0.85, }
var ModifiedPrivilegesRequiredWithUValueMap = map[ModifiedPrivilegesRequired]float64{ ModifiedPrivilegesRequiredNotDefined: 0, ModifiedPrivilegesRequiredHigh: 0.27, ModifiedPrivilegesRequiredLow: 0.62, ModifiedPrivilegesRequiredNone: 0.85, }
var ModifiedScopeValueMap = map[ModifiedScope]string{ ModifiedScopeNotDefined: "X", ModifiedScopeUnchanged: "U", ModifiedScopeChanged: "C", }
var ModifiedUserInteractionMap = map[ModifiedUserInteraction]string{ ModifiedUserInteractionNotDefined: "X", ModifiedUserInteractionRequired: "R", ModifiedUserInteractionNone: "N", }
var ModifiedUserInteractionValueMap = map[ModifiedUserInteraction]float64{ ModifiedUserInteractionNotDefined: 0, ModifiedUserInteractionRequired: 0.62, ModifiedUserInteractionNone: 0.85, }
Functions ¶
This section is empty.
Types ¶
type AttackComplexity ¶
type AttackComplexity int
AttackComplexity is metric type for Base Metrics
const ( AttackComplexityUnknown AttackComplexity = iota // AttackComplexityNotDefined AttackComplexityHigh AttackComplexityLow )
Constant of AttackComplexity result
func GetAttackComplexity ¶
func GetAttackComplexity(s string) AttackComplexity
GetAttackComplexity returns result of AttackComplexity metric
func (AttackComplexity) IsUnknown ¶
func (ac AttackComplexity) IsUnknown() bool
IsUnknown returns false if unknown result value of metric
func (AttackComplexity) String ¶
func (ac AttackComplexity) String() string
func (AttackComplexity) Value ¶
func (ac AttackComplexity) Value() float64
Value returns value of AttackComplexity metric
type AttackVector ¶
type AttackVector int
AttackVector is metric type for Base Metrics
const ( AttackVectorUnknown AttackVector = iota AttackVectorPhysical AttackVectorLocal AttackVectorAdjacent AttackVectorNetwork )
Constant of AttackVector result
func GetAttackVector ¶
func GetAttackVector(s string) AttackVector
GetAttackVector returns result of AttackVector metric
func (AttackVector) IsUnknown ¶
func (av AttackVector) IsUnknown() bool
IsUnknown returns false if unknouwn result value of metric
func (AttackVector) String ¶
func (av AttackVector) String() string
func (AttackVector) Value ¶
func (av AttackVector) Value() float64
Value returns value of AttackVector metric
type AvailabilityImpact ¶
type AvailabilityImpact int
AvailabilityImpact is metric type for Base Metrics
const ( AvailabilityImpactUnknown AvailabilityImpact = iota AvailabilityImpactNone AvailabilityImpactLow AvailabilityImpactHigh )
Constant of AvailabilityImpact result
func GetAvailabilityImpact ¶
func GetAvailabilityImpact(s string) AvailabilityImpact
GetAvailabilityImpact returns result of AvailabilityImpact metric
func (AvailabilityImpact) IsUnknown ¶
func (ai AvailabilityImpact) IsUnknown() bool
IsUnknown returns false if undefined result value of metric
func (AvailabilityImpact) String ¶
func (ai AvailabilityImpact) String() string
func (AvailabilityImpact) Value ¶
func (ai AvailabilityImpact) Value() float64
Value returns value of AvailabilityImpact metric
type AvailabilityRequirement ¶
type AvailabilityRequirement int
AvailabilityRequirement is metric type for Base Metrics
const ( AvailabilityRequirementInvalid AvailabilityRequirement = iota AvailabilityRequirementNotDefined AvailabilityRequirementLow AvailabilityRequirementMedium AvailabilityRequirementHigh )
Constant of AvailabilityRequirement result
func GetAvailabilityRequirement ¶
func GetAvailabilityRequirement(s string) AvailabilityRequirement
GetAvailabilityRequirement returns result of AvailabilityRequirement metric
func (AvailabilityRequirement) IsValid ¶ added in v1.4.0
func (ar AvailabilityRequirement) IsValid() bool
IsDefined returns false if undefined result value of metric
func (AvailabilityRequirement) String ¶
func (ar AvailabilityRequirement) String() string
func (AvailabilityRequirement) Value ¶
func (ar AvailabilityRequirement) Value() float64
Value returns value of AvailabilityRequirement metric
type Base ¶
type Base struct { Ver Version AV AttackVector AC AttackComplexity PR PrivilegesRequired UI UserInteraction S Scope C ConfidentialityImpact I IntegrityImpact A AvailabilityImpact // contains filtered or unexported fields }
Base is Base Metrics for CVSSv3
func (*Base) BaseMetrics ¶ added in v1.2.0
func (*Base) Decode ¶
Example ¶
package main import ( "fmt" "github.com/goark/go-cvss/v3/metric" ) func main() { m, err := metric.NewBase().Decode("CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N") //CVE-2015-8252 if err != nil { return } fmt.Println("Score =", m.Score()) fmt.Println("Severity =", m.Severity()) //Output //Score = 7.5 //Severity = High }
Output:
type ConfidentialityImpact ¶
type ConfidentialityImpact int
ConfidentialityImpact is metric type for Base Metrics
const ( ConfidentialityImpactUnknown ConfidentialityImpact = iota ConfidentialityImpactNone ConfidentialityImpactLow ConfidentialityImpactHigh )
Constant of ConfidentialityImpact result
func GetConfidentialityImpact ¶
func GetConfidentialityImpact(s string) ConfidentialityImpact
GetConfidentialityImpact returns result of ConfidentialityImpact metric
func (ConfidentialityImpact) IsUnknown ¶
func (ci ConfidentialityImpact) IsUnknown() bool
IsUnknown returns false if undefined result value of metric
func (ConfidentialityImpact) String ¶
func (ci ConfidentialityImpact) String() string
func (ConfidentialityImpact) Value ¶
func (ci ConfidentialityImpact) Value() float64
Value returns value of ConfidentialityImpact metric
type ConfidentialityRequirement ¶
type ConfidentialityRequirement int
ConfidentialityRequirement is metric type for Base Metrics
const ( ConfidentialityRequirementInvalid ConfidentialityRequirement = iota ConfidentialityRequirementNotDefined ConfidentialityRequirementLow ConfidentialityRequirementMedium ConfidentialityRequirementHigh )
Constant of ConfidentialityRequirement result
func GetConfidentialityRequirement ¶
func GetConfidentialityRequirement(s string) ConfidentialityRequirement
GetConfidentialityRequirement returns result of ConfidentalityRequirement metric
func (ConfidentialityRequirement) IsValid ¶ added in v1.4.0
func (cr ConfidentialityRequirement) IsValid() bool
IsDefined returns false if undefined result value of metric
func (ConfidentialityRequirement) String ¶
func (cr ConfidentialityRequirement) String() string
func (ConfidentialityRequirement) Value ¶
func (cr ConfidentialityRequirement) Value() float64
Value returns value of ConfidentialityRequirement metric
type Environmental ¶
type Environmental struct { *Temporal CR ConfidentialityRequirement IR IntegrityRequirement AR AvailabilityRequirement MAV ModifiedAttackVector MAC ModifiedAttackComplexity MPR ModifiedPrivilegesRequired MUI ModifiedUserInteraction MS ModifiedScope MC ModifiedConfidentialityImpact MI ModifiedIntegrityImpact MA ModifiedAvailabilityImpact // contains filtered or unexported fields }
Base is Environmental Metrics for CVSSv3
func NewEnvironmental ¶
func NewEnvironmental() *Environmental
NewBase returns Base Metrics instance
func (*Environmental) BaseMetrics ¶
func (em *Environmental) BaseMetrics() *Base
BaseMetrics returns Base metrics in Environmental metrics instance
func (*Environmental) Decode ¶
func (em *Environmental) Decode(vector string) (*Environmental, error)
func (*Environmental) Encode ¶
func (em *Environmental) Encode() (string, error)
Encode returns CVSSv3 vector string
func (*Environmental) GetError ¶
func (em *Environmental) GetError() error
GetError returns error instance if undefined metric
func (*Environmental) Score ¶
func (em *Environmental) Score() float64
func (*Environmental) Severity ¶
func (em *Environmental) Severity() Severity
Severity returns severity by score of Environmental metrics
func (*Environmental) TemporalMetrics ¶
func (em *Environmental) TemporalMetrics() *Temporal
type Exploitability ¶
type Exploitability int
Exploitability is metric type for Temporal Metrics
const ( ExploitabilityInvalid Exploitability = iota ExploitabilityNotDefined ExploitabilityUnproven ExploitabilityProofOfConcept ExploitabilityFunctional ExploitabilityHigh )
Constant of Exploitability result
func GetExploitability ¶
func GetExploitability(s string) Exploitability
GetExploitability returns result of Exploitability metric
func (Exploitability) IsValid ¶ added in v1.4.0
func (ex Exploitability) IsValid() bool
IsDefined returns false if undefined result value of metric
func (Exploitability) String ¶
func (ex Exploitability) String() string
func (Exploitability) Value ¶
func (ex Exploitability) Value() float64
Value returns value of Exploitability metric
type IntegrityImpact ¶
type IntegrityImpact int
IntegrityImpact is metric type for Base Metrics
const ( IntegrityImpactUnknown IntegrityImpact = iota IntegrityImpactNone IntegrityImpactLow IntegrityImpactHigh )
Constant of IntegrityImpact result
func GetIntegrityImpact ¶
func GetIntegrityImpact(s string) IntegrityImpact
GetIntegrityImpact returns result of IntegrityImpact metric
func (IntegrityImpact) IsUnknown ¶ added in v1.4.0
func (ii IntegrityImpact) IsUnknown() bool
IsUnKnown returns false if undefined result value of metric
func (IntegrityImpact) String ¶
func (ii IntegrityImpact) String() string
func (IntegrityImpact) Value ¶
func (ii IntegrityImpact) Value() float64
Value returns value of IntegrityImpact metric
type IntegrityRequirement ¶
type IntegrityRequirement int
IntegrityRequirement is metric type for Base Metrics
const ( IntegrityRequirementInvalid IntegrityRequirement = iota IntegrityRequirementNotDefined IntegrityRequirementLow IntegrityRequirementMedium IntegrityRequirementHigh )
Constant of IntegrityRequirement result
func GetIntegrityRequirement ¶
func GetIntegrityRequirement(s string) IntegrityRequirement
GetIntegrityRequirement returns result of ConfidentalityRequirement metric
func (IntegrityRequirement) IsValid ¶ added in v1.4.0
func (ir IntegrityRequirement) IsValid() bool
IsDefined returns false if undefined result value of metric
func (IntegrityRequirement) String ¶
func (ir IntegrityRequirement) String() string
func (IntegrityRequirement) Value ¶
func (ir IntegrityRequirement) Value() float64
Value returns value of AttackVector metric
type Metrics ¶ added in v1.2.0
type Metrics interface { // BaseMetrics returns the base type for any given metrics type. BaseMetrics() *Base }
type ModifiedAttackComplexity ¶
type ModifiedAttackComplexity int
ModifiedAttackComplexity is metric type for Base Metrics
const ( ModifiedAttackComplexityInvalid ModifiedAttackComplexity = iota ModifiedAttackComplexityNotDefined ModifiedAttackComplexityHigh ModifiedAttackComplexityLow )
Constant of ModifiedAttackComplexity result
func GetModifiedAttackComplexity ¶
func GetModifiedAttackComplexity(s string) ModifiedAttackComplexity
GetModifiedAttackComplexity returns result of ModifiedAttackComplexity metric
func (ModifiedAttackComplexity) IsValid ¶ added in v1.4.0
func (mac ModifiedAttackComplexity) IsValid() bool
IsDefined returns false if undefined result value of metric
func (ModifiedAttackComplexity) String ¶
func (mac ModifiedAttackComplexity) String() string
func (ModifiedAttackComplexity) Value ¶
func (mac ModifiedAttackComplexity) Value(ac AttackComplexity) float64
Value returns value of ModifiedAttackComplexity metric
type ModifiedAttackVector ¶
type ModifiedAttackVector int
ModifiedAttackVector is metric type for Base Metrics
const ( ModifiedAttackVectorInvalid ModifiedAttackVector = iota ModifiedAttackVectorNotDefined ModifiedAttackVectorPhysical ModifiedAttackVectorLocal ModifiedAttackVectorAdjacent ModifiedAttackVectorNetwork )
Constant of ModifiedAttackVector result
func GetModifiedAttackVector ¶
func GetModifiedAttackVector(s string) ModifiedAttackVector
GetModifiedAttackVector returns result of ModifiedAttackVector metric
func (ModifiedAttackVector) IsValid ¶ added in v1.4.0
func (mav ModifiedAttackVector) IsValid() bool
IsDefined returns false if undefined result value of metric
func (ModifiedAttackVector) String ¶
func (mav ModifiedAttackVector) String() string
func (ModifiedAttackVector) Value ¶
func (mav ModifiedAttackVector) Value(av AttackVector) float64
Value returns value of ModifiedAttackVector metric
type ModifiedAvailabilityImpact ¶
type ModifiedAvailabilityImpact int
ModifiedAvailabilityImpact is metric type for Base Metrics
const ( ModifiedAvailabilityInvalid ModifiedAvailabilityImpact = iota ModifiedAvailabilityImpactNotDefined ModifiedAvailabilityImpactNone ModifiedAvailabilityImpactLow ModifiedAvailabilityImpactHigh )
Constant of ModifiedAvailabilityImpact result
func GetModifiedAvailabilityImpact ¶
func GetModifiedAvailabilityImpact(s string) ModifiedAvailabilityImpact
GetModifiedAvailabilityImpact returns result of ModifiedAvailabilityImpact metric
func (ModifiedAvailabilityImpact) IsValid ¶ added in v1.4.0
func (mai ModifiedAvailabilityImpact) IsValid() bool
IsDefined returns false if undefined result value of metric
func (ModifiedAvailabilityImpact) String ¶
func (mai ModifiedAvailabilityImpact) String() string
func (ModifiedAvailabilityImpact) Value ¶
func (mai ModifiedAvailabilityImpact) Value(ai AvailabilityImpact) float64
Value returns value of ModifiedAvailabilityImpact metric
type ModifiedConfidentialityImpact ¶
type ModifiedConfidentialityImpact int
ModifiedConfidentialityImpact is metric type for Base Metrics
const ( ModifiedConfidentialityImpactInvalid ModifiedConfidentialityImpact = iota ModifiedConfidentialityImpactNotDefined ModifiedConfidentialityImpactNone ModifiedConfidentialityImpactLow ModifiedConfidentialityImpactHigh )
Constant of ModifiedConfidentialityImpact result
func GetModifiedConfidentialityImpact ¶
func GetModifiedConfidentialityImpact(s string) ModifiedConfidentialityImpact
GetModifiedConfidentialityImpact returns result of ModifiedConfidentialityImpact metric
func (ModifiedConfidentialityImpact) IsValid ¶ added in v1.4.0
func (mci ModifiedConfidentialityImpact) IsValid() bool
IsDefined returns false if undefined result value of metric
func (ModifiedConfidentialityImpact) String ¶
func (mci ModifiedConfidentialityImpact) String() string
func (ModifiedConfidentialityImpact) Value ¶
func (mci ModifiedConfidentialityImpact) Value(ci ConfidentialityImpact) float64
Value returns value of ModifiedConfidentialityImpact metric
type ModifiedIntegrityImpact ¶
type ModifiedIntegrityImpact int
ModifiedIntegrityImpact is metric type for Base Metrics
const ( ModifiedIntegrityImpactInvalid ModifiedIntegrityImpact = iota ModifiedIntegrityImpactNotDefined ModifiedIntegrityImpactNone ModifiedIntegrityImpactLow ModifiedIntegrityImpactHigh )
Constant of ModifiedIntegrityImpact result
func GetModifiedIntegrityImpact ¶
func GetModifiedIntegrityImpact(s string) ModifiedIntegrityImpact
GetModifiedIntegrityImpact returns result of ModifiedIntegrityImpact metric
func (ModifiedIntegrityImpact) IsValid ¶ added in v1.4.0
func (mii ModifiedIntegrityImpact) IsValid() bool
IsDefined returns false if undefined result value of metric
func (ModifiedIntegrityImpact) String ¶
func (mii ModifiedIntegrityImpact) String() string
func (ModifiedIntegrityImpact) Value ¶
func (mii ModifiedIntegrityImpact) Value(ii IntegrityImpact) float64
Value returns value of ModifiedIntegrityImpact metric
type ModifiedPrivilegesRequired ¶
type ModifiedPrivilegesRequired int
ModifiedPrivilegesRequired is metric type for Base Metrics
const ( ModifiedPrivilegesRequiredInvalid ModifiedPrivilegesRequired = iota ModifiedPrivilegesRequiredNotDefined ModifiedPrivilegesRequiredHigh ModifiedPrivilegesRequiredLow ModifiedPrivilegesRequiredNone )
Constant of ModifiedPrivilegesRequired result
func GetModifiedPrivilegesRequired ¶
func GetModifiedPrivilegesRequired(s string) ModifiedPrivilegesRequired
GetModifiedPrivilegesRequired returns result of ModifiedPrivilegesRequired metric
func (ModifiedPrivilegesRequired) IsValid ¶ added in v1.4.0
func (mpr ModifiedPrivilegesRequired) IsValid() bool
IsDefined returns false if undefined result value of metric
func (ModifiedPrivilegesRequired) String ¶
func (mpr ModifiedPrivilegesRequired) String() string
func (ModifiedPrivilegesRequired) Value ¶
func (mpr ModifiedPrivilegesRequired) Value(ms ModifiedScope, s Scope, pr PrivilegesRequired) float64
Value returns value of ModifiedPrivilegesRequired metric
type ModifiedScope ¶
type ModifiedScope int
ModifiedScope is metric type for Base Metrics
const ( ModifiedScopeInvalid ModifiedScope = iota ModifiedScopeNotDefined ModifiedScopeUnchanged ModifiedScopeChanged )
Constant of ModifiedScope result
func GetModifiedScope ¶
func GetModifiedScope(s string) ModifiedScope
GetModifiedScope returns result of ModifiedScope metric
func (ModifiedScope) IsValid ¶ added in v1.4.0
func (msc ModifiedScope) IsValid() bool
IsDefined returns false if undefined result value of metric
func (ModifiedScope) String ¶
func (msc ModifiedScope) String() string
type ModifiedUserInteraction ¶
type ModifiedUserInteraction int
ModifiedUserInteraction is metric type for Base Metrics
const ( ModifiedUserInteractionInvalid ModifiedUserInteraction = iota ModifiedUserInteractionNotDefined ModifiedUserInteractionRequired ModifiedUserInteractionNone )
Constant of ModifiedUserInteraction result
func GetModifiedUserInteraction ¶
func GetModifiedUserInteraction(s string) ModifiedUserInteraction
GetModifiedUserInteraction returns result of ModifiedUserInteraction metric
func (ModifiedUserInteraction) IsValid ¶ added in v1.4.0
func (mui ModifiedUserInteraction) IsValid() bool
IsDefined returns false if undefined result value of metric
func (ModifiedUserInteraction) String ¶
func (mui ModifiedUserInteraction) String() string
func (ModifiedUserInteraction) Value ¶
func (mui ModifiedUserInteraction) Value(ui UserInteraction) float64
Value returns value of ModifiedUserInteraction metric
type PrivilegesRequired ¶
type PrivilegesRequired int
PrivilegesRequired is metric type for Base Metrics
const ( PrivilegesRequiredUnknown PrivilegesRequired = iota PrivilegesRequiredHigh PrivilegesRequiredLow PrivilegesRequiredNone )
Constant of PrivilegesRequired result
func GetPrivilegesRequired ¶
func GetPrivilegesRequired(s string) PrivilegesRequired
GetPrivilegesRequired returns result of PrivilegesRequired metric
func (PrivilegesRequired) IsUnknown ¶
func (pr PrivilegesRequired) IsUnknown() bool
IsUnknown returns false if undefined result value of metric
func (PrivilegesRequired) String ¶
func (pr PrivilegesRequired) String() string
func (PrivilegesRequired) Value ¶
func (pr PrivilegesRequired) Value(s Scope) float64
Value returns value of PrivilegesRequired metric
type RemediationLevel ¶
type RemediationLevel int
RemediationLevel is metric type for Temporal Metrics
const ( RemediationLevelInvalid RemediationLevel = iota RemediationLevelNotDefined RemediationLevelOfficialFix RemediationLevelTemporaryFix RemediationLevelWorkaround )
Constant of RemediationLevel result
func GetRemediationLevel ¶
func GetRemediationLevel(s string) RemediationLevel
GetRemediationLevel returns result of RemediationLevel metric
func (RemediationLevel) IsValid ¶ added in v1.4.0
func (rl RemediationLevel) IsValid() bool
IsDefined returns false if undefined result value of metric
func (RemediationLevel) String ¶
func (rl RemediationLevel) String() string
func (RemediationLevel) Value ¶
func (rl RemediationLevel) Value() float64
Value returns value of RemediationLevel metric
type ReportConfidence ¶
type ReportConfidence int
ReportConfidence is metric type for Temporal Metrics
const ( ReportConfidenceInvalid ReportConfidence = iota ReportConfidenceNotDefined ReportConfidenceUnknown ReportConfidenceReasonable ReportConfidenceConfirmed )
Constant of ReportConfidence result
func GetReportConfidence ¶
func GetReportConfidence(s string) ReportConfidence
GetReportConfidence returns result of ReportConfidence metric
func (ReportConfidence) IsValid ¶ added in v1.4.0
func (rc ReportConfidence) IsValid() bool
IsDefined returns false if undefined result value of metric
func (ReportConfidence) String ¶
func (rc ReportConfidence) String() string
func (ReportConfidence) Value ¶
func (rc ReportConfidence) Value() float64
Value returns value of ReportConfidence metric
type Scope ¶
type Scope int
Scope is metric type for Base Metrics
type Severity ¶
type Severity int
Severity is severity for Base Metrics
type Temporal ¶
type Temporal struct { *Base E Exploitability RL RemediationLevel RC ReportConfidence // contains filtered or unexported fields }
Base is Temporal Metrics for CVSSv3
func (*Temporal) BaseMetrics ¶
BaseMetrics returns Base metrics in Temporal metrics instance
type UserInteraction ¶
type UserInteraction int
UserInteraction is metric type for Base Metrics
const ( UserInteractionUnknown UserInteraction = iota UserInteractionRequired UserInteractionNone )
Constant of UserInteraction result
func GetUserInteraction ¶
func GetUserInteraction(s string) UserInteraction
GetUserInteraction returns result of UserInteraction metric
func (UserInteraction) IsUnknown ¶
func (ui UserInteraction) IsUnknown() bool
IsUnknown returns false if undefined result value of metric
func (UserInteraction) String ¶
func (ui UserInteraction) String() string
func (UserInteraction) Value ¶
func (ui UserInteraction) Value() float64
Value returns value of UserInteraction metric
type Version ¶
type Version int
Version is error number for CVSS
func GetVersion ¶
GetVersion returns Version number from string
Source Files ¶
- attack-complexity.go
- attack-vector.go
- availability-impact.go
- availability-requirement.go
- base.go
- confidentiality-impact.go
- confidentiality-requirement.go
- environmental.go
- exploitability.go
- integrity-impact.go
- integrity-requirement.go
- misc.go
- modified-attack-complexity.go
- modified-attack-vector.go
- modified-availability.go
- modified-confidentiality.go
- modified-integrity.go
- modified-privileges-required.go
- modified-scope.go
- modified-user-interaction.go
- privileges-required.go
- remediation-level.go
- report-confidence.go
- scope.go
- severity.go
- temporal.go
- user-interaction.go
- version.go