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, #initialize, #valid?

Constructor Details

This class inherits a constructor from CvssSuite::CvssMetric

Instance Attribute Details

#exploit_code_maturityObject (readonly)

Property of this metric



15
16
17
# File 'lib/cvss_suite/cvss31/cvss31_temporal.rb', line 15

def exploit_code_maturity
  @exploit_code_maturity
end

#remediation_levelObject (readonly)

Property of this metric



15
16
17
# File 'lib/cvss_suite/cvss31/cvss31_temporal.rb', line 15

def remediation_level
  @remediation_level
end

#report_confidenceObject (readonly)

Property of this metric



15
16
17
# File 'lib/cvss_suite/cvss31/cvss31_temporal.rb', line 15

def report_confidence
  @report_confidence
end

Instance Method Details

#scoreObject

Returns score of this metric



19
20
21
22
23
# File 'lib/cvss_suite/cvss31/cvss31_temporal.rb', line 19

def score
  return 1.0 unless valid?

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