All Projects → siemens → cvss-suite

siemens / cvss-suite

Licence: MIT license
CvssSuite - This Ruby gem helps you to process the vector of the Common Vulnerability Scoring System.

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to cvss-suite

has placeholder image
A Ruby gem for generating string based placeholder images in Rails.
Stars: ✭ 20 (+11.11%)
Mutual labels:  ruby-gem
mobility-actiontext
Translate Rails Action Text rich text with Mobility.
Stars: ✭ 27 (+50%)
Mutual labels:  ruby-gem
glimmer-dsl-swt
Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)
Stars: ✭ 53 (+194.44%)
Mutual labels:  ruby-gem
lazylead
Eliminate the annoying work within ticketing systems (Jira, GitHub, Trello). Allows automating (without admin access) daily actions like tickets fields verification, email notifications by JQL/GQL, meeting requests to your (or teammates) calendar.
Stars: ✭ 42 (+133.33%)
Mutual labels:  ruby-gem
detectify
Detectify is a gem for multi-tenant Rack apps, to help you retrieve domain and subdomain-related data from a database.
Stars: ✭ 79 (+338.89%)
Mutual labels:  ruby-gem
parse-stack
Parse Server Ruby Client SDK
Stars: ✭ 59 (+227.78%)
Mutual labels:  ruby-gem
glimmer-dsl-tk
Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library)
Stars: ✭ 26 (+44.44%)
Mutual labels:  ruby-gem
kitchen-habitat
A Test Kitchen Driver for Habitat
Stars: ✭ 13 (-27.78%)
Mutual labels:  ruby-gem
ruby attic
💍 Unmaintained ruby projects needing people!
Stars: ✭ 26 (+44.44%)
Mutual labels:  ruby-gem
kitchen-pester
A Test Kitchen driver to execute Pester as a verifier
Stars: ✭ 29 (+61.11%)
Mutual labels:  ruby-gem
vulristics
Extensible framework for analyzing publicly available information about vulnerabilities
Stars: ✭ 46 (+155.56%)
Mutual labels:  cvss
secrets cli
CLI for storing and reading your secrets via vault
Stars: ✭ 24 (+33.33%)
Mutual labels:  ruby-gem
instagram graph api
This is a version of koala gem which provides commonly used Instagram Graph APIs
Stars: ✭ 28 (+55.56%)
Mutual labels:  ruby-gem
make model searchable
Adds simlpe search functionality to models
Stars: ✭ 27 (+50%)
Mutual labels:  ruby-gem
tty-tree
Print directory or structured data in a tree like format
Stars: ✭ 54 (+200%)
Mutual labels:  ruby-gem
space-invaders
👾 Space Invaders 2d game with Ruby/Gosu
Stars: ✭ 16 (-11.11%)
Mutual labels:  ruby-gem
jsonapi-serializer-formats
💎 Gem to enrich jsonapi-serializer with multiple formats
Stars: ✭ 20 (+11.11%)
Mutual labels:  ruby-gem
codeship-ruby
[deprecated] Easily interact with Codeship
Stars: ✭ 13 (-27.78%)
Mutual labels:  ruby-gem
rails cursor pagination
Add cursor pagination to your ActiveRecord backed application
Stars: ✭ 21 (+16.67%)
Mutual labels:  ruby-gem
opta sd
OPTA Sports Data Soccer API Client (OPTA SDAPI)
Stars: ✭ 28 (+55.56%)
Mutual labels:  ruby-gem

CvssSuite for Ruby

Gem Version Ruby Version Cvss Support Cvss Support Cvss Support RSpec

This Ruby gem helps you to process the vector of the Common Vulnerability Scoring System. Besides calculating the Base, Temporal and Environmental Score, you are able to extract the selected option.

Installation

Add this line to your application's Gemfile:

gem 'cvss-suite'

And then execute:

$ bundle

Or install it yourself as:

$ gem install cvss-suite

Version 2.x

If you are still using CvssSuite 2.x please refer to the specific branch for documentation and changelog.

Version 1.x

If you are still using CvssSuite 1.x please refer to the specific branch for documentation and changelog.

Usage

require 'cvss_suite'

cvss3 = CvssSuite.new('CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L/CR:L/IR:M/AR:H/MAV:N/MAC:H/MPR:N/MUI:R/MS:U/MC:N/MI:L/MA:H')

vector = cvss3.vector       # 'CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L/CR:L/IR:M/AR:H/MAV:N/MAC:H/MPR:N/MUI:R/MS:U/MC:N/MI:L/MA:H'
version = cvss3.version     # 3.0
valid = cvss3.valid?        # true
severity = cvss3.severity   # 'High'

cvss31 = CvssSuite.new('CVSS:3.1/AV:P/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:H/E:H/RL:U/RC:U')

vector = cvss31.vector     # 'CVSS:3.1/AV:P/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:H/E:H/RL:U/RC:U'
version = cvss31.version   # 3.1
valid = cvss31.valid?      # true
severity = cvss31.severity # 'Medium'

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
valid = cvss.valid?        # true
severity = cvss.severity   # 'Low'

# 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.values.each do |value|
    value[:name]           # 'Local', 'Adjacent Network', 'Network'
    value[:abbreviation]   # 'L', 'A', 'N'
    value[:selected]       # false, true, false
end

# Selected options
cvss.base.access_vector.selected_value[:name]          # Adjacent Network
cvss.temporal.remediation_level.selected_value[:name]  # Temporary Fix

# Exceptions

cvss = CvssSuite.new('random_string')  # invalid vector
valid = cvss.valid?     # false
version = cvss.version  # will throw CvssSuite::Errors::InvalidVector: Vector is not valid!
cvss.base_score         # will throw CvssSuite::Errors::InvalidVector: Vector is not valid!

cvss = CvssSuite.new(1337)  # invalid vector
valid = cvss.valid?     # false
version = cvss.version  # will throw CvssSuite::Errors::InvalidVector: Vector is not valid!
cvss.base_score         # will throw CvssSuite::Errors::InvalidVector: 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
valid = cvss.valid?     # false
cvss.base_score         # will throw CvssSuite::Errors::InvalidVector: Vector is not valid!

Notable Features

Properties (Access Vector, Remediation Level, etc) do have a position attribute, with this they can be ordered the same way they appear in the vector.

Known Issues

Currently it is not possible to leave an attribute blank instead of ND/X. If you don't have a value for an attribute, please use ND/X instead.

There is a possibility of implementations generating different scores (+/- 0,1) due to small floating-point inaccuracies. This can happen due to differences in floating point arithmetic between different languages and hardware platforms.

Changelog

Click here to see all changes.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/0llirocks/cvss-suite. This project is intended to be a safe, welcoming space for collaboration.

References

CvssSuite for .NET

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].