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

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



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

def exploit_code_maturity
  @exploit_code_maturity
end

#remediation_levelObject (readonly)

Property of this metric



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

def remediation_level
  @remediation_level
end

#report_confidenceObject (readonly)

Property of this metric



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

def report_confidence
  @report_confidence
end

Instance Method Details

#scoreObject

Returns score of this metric



25
26
27
28
29
# File 'lib/cvss_suite/cvss31/cvss31_temporal.rb', line 25

def score
  return 1.0 unless valid?

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