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 score of this metric.
Methods inherited from CvssMetric
Constructor Details
This class inherits a constructor from CvssSuite::CvssMetric
Instance Attribute Details
#attack_complexity ⇒ Object (readonly)
Property of this metric
17 18 19 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 17 def attack_complexity @attack_complexity end |
#attack_requirements ⇒ Object (readonly)
Property of this metric
17 18 19 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 17 def attack_requirements @attack_requirements end |
#attack_vector ⇒ Object (readonly)
Property of this metric
17 18 19 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 17 def attack_vector @attack_vector end |
#privileges_required ⇒ Object (readonly)
Property of this metric
17 18 19 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 17 def privileges_required @privileges_required end |
#subsequent_system_availability ⇒ Object (readonly)
Property of this metric
17 18 19 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 17 def subsequent_system_availability @subsequent_system_availability end |
#subsequent_system_confidentiality ⇒ Object (readonly)
Property of this metric
17 18 19 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 17 def subsequent_system_confidentiality @subsequent_system_confidentiality end |
#subsequent_system_integrity ⇒ Object (readonly)
Property of this metric
17 18 19 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 17 def subsequent_system_integrity @subsequent_system_integrity end |
#user_interaction ⇒ Object (readonly)
Property of this metric
17 18 19 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 17 def user_interaction @user_interaction end |
#vulnerable_system_availability ⇒ Object (readonly)
Property of this metric
17 18 19 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 17 def vulnerable_system_availability @vulnerable_system_availability end |
#vulnerable_system_confidentiality ⇒ Object (readonly)
Property of this metric
17 18 19 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 17 def vulnerable_system_confidentiality @vulnerable_system_confidentiality end |
#vulnerable_system_integrity ⇒ Object (readonly)
Property of this metric
17 18 19 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 17 def vulnerable_system_integrity @vulnerable_system_integrity end |
Instance Method Details
#score ⇒ Object
Returns score of this metric
23 24 25 |
# File 'lib/cvss_suite/cvss40/cvss40_base.rb', line 23 def score Cvss40CalcHelper.new(@properties.map { |p| [p.abbreviation, p.selected_value[:abbreviation]] }.to_h).score end |