RubyGems Navigation menu

cvss-suite 1.0.2

This Ruby gem helps you to process the vector of the Common Vulnerability Scoring System (https://www.first.org/cvss/specification-document). Besides calculating the Base, Temporal and Environmental Score, you are able to extract the selected option. Homepage is still in progress and will be published soon (along with full documentation). ## Usage ```ruby require 'cvss_suite' cvss = CvssSuite.new('AV:A/AC:M/Au:S/C:P/I:P/A:P/E:POC/RL:TF/RC:UC/CDP:L/TD:M/CR:M/IR:M/AR:M') vector = cvss.vector # 'AV:A/AC:M/Au:S/C:P/I:P/A:P/E:POC/RL:TF/RC:UC/CDP:L/TD:M/CR:M/IR:M/AR:M' version = cvss.version # 2 # Scores base_score = cvss.base_score # 4.9 temporal_score = cvss.temporal_score # 3.6 environmental_score = cvss.environmental_score # 3.2 overall_score = cvss.overall_score # 3.2 # Available options access_vector = cvss.base.access_vector.name # 'Access Vector' remediation_level = cvss.temporal.remediation_level.name # 'Remediation Level' access_vector.choices.each do |choice| choice[:name] # 'Local', 'Adjacent Network', 'Network' choice[:abbreviation] # 'L', 'A', 'N' choice[:selected] # false, true, false end # Selected options cvss.base.access_vector.selected_choice[:name] # Adjacent Network cvss.temporal.remediation_level.selected_choice[:name] # Temporary Fix # Exceptions CvssSuite.new('random_string') # will throw a RuntimeError: Vector is not valid! CvssSuite.new() # will throw a ArgumentError cvss = CvssSuite.new('AV:N/AC:P/C:P/AV:U/RL:OF/RC:C') # invalid vector, authentication is missing version = cvss.version # 2 cvss.base_score # will throw a RuntimeError: Vector is not valid! ```

Gemfile:
=

安装:
=

版本列表:

  1. 4.0.0 August 31, 2024 (29.0 KB)
  2. 3.3.0 August 31, 2024 (29.0 KB)
  3. 3.2.2 August 04, 2024 (29.0 KB)
  4. 3.2.1 May 25, 2024 (29.0 KB)
  5. 3.2.0 May 04, 2024 (28.5 KB)
  6. 1.0.2 April 15, 2016 (4.7 MB)
显示所有版本 (共 29 个)

Development 依赖 (7):

badgerbadgerbadger ~> 0.14.0
bundler ~> 1.10
rake ~> 10.0
rdoc ~> 4.2
rspec ~> 3.4
rspec-its ~> 1.2
simplecov ~> 0.11.2

所有者:

作者:

  • Oliver Hamboerger

SHA 256 校验和:

=

下载总量 17,691,986

这个版本 2,279

版本发布:

许可:

MIT

需要的 Ruby 版本: >= 0

链接: