Class: CvssSuite::Cvss31Temporal

Inherits:
CvssMetric show all
Defined in:
lib/cvss_suite/cvss31/cvss31_temporal.rb

Overview

This class represents a CVSS Temporal metric in version 3.1.

Instance Attribute Summary collapse

Attributes inherited from CvssMetric

#properties

Instance Method Summary collapse

Methods inherited from CvssMetric

#count, #explicitly_provided?, #initialize, #valid?

Constructor Details

This class inherits a constructor from CvssSuite::CvssMetric

Instance Attribute Details

#exploit_code_maturityObject (readonly)

Property of this metric



17
18
19
# File 'lib/cvss_suite/cvss31/cvss31_temporal.rb', line 17

def exploit_code_maturity
  @exploit_code_maturity
end

#remediation_levelObject (readonly)

Property of this metric



17
18
19
# File 'lib/cvss_suite/cvss31/cvss31_temporal.rb', line 17

def remediation_level
  @remediation_level
end

#report_confidenceObject (readonly)

Property of this metric



17
18
19
# File 'lib/cvss_suite/cvss31/cvss31_temporal.rb', line 17

def report_confidence
  @report_confidence
end

Instance Method Details

#scoreObject

Returns score of this metric



21
22
23
24
25
# File 'lib/cvss_suite/cvss31/cvss31_temporal.rb', line 21

def score
  return 1.0 unless valid?

  @exploit_code_maturity.score * @remediation_level.score * @report_confidence.score
end