Class: CvssSuite::Cvss40Base
- Inherits:
-
CvssMetric
- Object
- CvssMetric
- CvssSuite::Cvss40Base
- Defined in:
- lib/cvss_suite/cvss40/cvss40_base.rb
Overview
This class represents a CVSS Base metric in version 4.0.
Instance Attribute Summary collapse
-
#attack_complexity ⇒ Object
readonly
Property of this metric.
-
#attack_requirements ⇒ Object
readonly
Property of this metric.
-
#attack_vector ⇒ Object
readonly
Property of this metric.
-
#privileges_required ⇒ Object
readonly
Property of this metric.
-
#subsequent_system_availability ⇒ Object
readonly
Property of this metric.
-
#subsequent_system_confidentiality ⇒ Object
readonly
Property of this metric.
-
#subsequent_system_integrity ⇒ Object
readonly
Property of this metric.
-
#user_interaction ⇒ Object
readonly
Property of this metric.
-
#vulnerable_system_availability ⇒ Object
readonly
Property of this metric.
-
#vulnerable_system_confidentiality ⇒ Object
readonly
Property of this metric.
-
#vulnerable_system_integrity ⇒ Object
readonly
Property of this metric.
Attributes inherited from CvssMetric
Instance Method Summary collapse
-
#score ⇒ Object
Returns the base score of these metrics, ignoring threat and environmental metrics.
Methods inherited from CvssMetric
#count, #explicitly_provided?, #initialize, #valid?
Constructor Details
This class inherits a constructor from CvssSuite::CvssMetric
Instance Attribute Details
#attack_complexity ⇒ Object (readonly)
Property of this metric
19 20 21 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 19 def attack_complexity @attack_complexity end |
#attack_requirements ⇒ Object (readonly)
Property of this metric
19 20 21 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 19 def attack_requirements @attack_requirements end |
#attack_vector ⇒ Object (readonly)
Property of this metric
19 20 21 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 19 def attack_vector @attack_vector end |
#privileges_required ⇒ Object (readonly)
Property of this metric
19 20 21 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 19 def privileges_required @privileges_required end |
#subsequent_system_availability ⇒ Object (readonly)
Property of this metric
19 20 21 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 19 def subsequent_system_availability @subsequent_system_availability end |
#subsequent_system_confidentiality ⇒ Object (readonly)
Property of this metric
19 20 21 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 19 def subsequent_system_confidentiality @subsequent_system_confidentiality end |
#subsequent_system_integrity ⇒ Object (readonly)
Property of this metric
19 20 21 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 19 def subsequent_system_integrity @subsequent_system_integrity end |
#user_interaction ⇒ Object (readonly)
Property of this metric
19 20 21 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 19 def user_interaction @user_interaction end |
#vulnerable_system_availability ⇒ Object (readonly)
Property of this metric
19 20 21 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 19 def vulnerable_system_availability @vulnerable_system_availability end |
#vulnerable_system_confidentiality ⇒ Object (readonly)
Property of this metric
19 20 21 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 19 def vulnerable_system_confidentiality @vulnerable_system_confidentiality end |
#vulnerable_system_integrity ⇒ Object (readonly)
Property of this metric
19 20 21 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 19 def vulnerable_system_integrity @vulnerable_system_integrity end |
Instance Method Details
#score ⇒ Object
Returns the base score of these metrics, ignoring threat and environmental metrics.
25 26 27 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 25 def score Cvss40CalcHelper.new(@properties.to_h { |p| [p.abbreviation, p.selected_value[:abbreviation]] }).score end |