Class: CvssSuite::Cvss40
- Inherits:
-
Cvss40AndLater
- Object
- Cvss
- Cvss40AndLater
- CvssSuite::Cvss40
- Defined in:
- lib/cvss_suite/cvss40/cvss40.rb
Overview
This class represents a CVSS vector in version 4.0.
Instance Attribute Summary
Attributes inherited from Cvss40AndLater
#environmental, #environmental_security, #supplemental, #threat
Attributes inherited from Cvss
Instance Method Summary collapse
-
#base_score ⇒ Object
Returns the base score of the CVSS vector, ignoring threat and environmental metrics -- the base score as published by NVD/GHSA.
-
#vector ⇒ Object
Returns the vector itself.
-
#version ⇒ Object
Returns the Version of the CVSS vector.
Methods inherited from Cvss40AndLater
#initialize, #overall_score, #score, #valid?
Methods inherited from Cvss
Constructor Details
This class inherits a constructor from CvssSuite::Cvss40AndLater
Instance Method Details
#base_score ⇒ Object
Returns the base score of the CVSS vector, ignoring threat and environmental metrics -- the base score as published by NVD/GHSA.
36 37 38 39 |
# File 'lib/cvss_suite/cvss40/cvss40.rb', line 36 def base_score check_validity @base.score end |
#vector ⇒ Object
Returns the vector itself.
29 30 31 |
# File 'lib/cvss_suite/cvss40/cvss40.rb', line 29 def vector "#{CvssSuite::CVSS_VECTOR_BEGINNINGS.find { |beginning| beginning[:version] == version }[:string]}#{@vector}" end |
#version ⇒ Object
Returns the Version of the CVSS vector.
23 24 25 |
# File 'lib/cvss_suite/cvss40/cvss40.rb', line 23 def version 4.0 end |