cvss-suite 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/CODE_OF_CONDUCT.md +9 -0
- data/Gemfile +10 -0
- data/README.md +1 -1
- data/cvss_suite.gemspec +11 -3
- data/lib/cvss_suite.rb +9 -1
- data/lib/cvss_suite/cvss.rb +9 -1
- data/lib/cvss_suite/cvss2/cvss2.rb +9 -1
- data/lib/cvss_suite/cvss2/cvss2_base.rb +9 -1
- data/lib/cvss_suite/cvss2/cvss2_environmental.rb +9 -1
- data/lib/cvss_suite/cvss2/cvss2_temporal.rb +9 -1
- data/lib/cvss_suite/cvss3/cvss3.rb +9 -1
- data/lib/cvss_suite/cvss3/cvss3_base.rb +9 -1
- data/lib/cvss_suite/cvss3/cvss3_environmental.rb +9 -1
- data/lib/cvss_suite/cvss3/cvss3_temporal.rb +9 -1
- data/lib/cvss_suite/cvss_metric.rb +9 -1
- data/lib/cvss_suite/cvss_property.rb +9 -1
- data/lib/cvss_suite/helpers/cvss3_helper.rb +9 -1
- data/lib/cvss_suite/helpers/extensions.rb +19 -1
- data/lib/cvss_suite/version.rb +10 -2
- metadata +2 -5
- data/Rakefile +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41f9d10edef456e09bc17730d1454e427fe94051
|
4
|
+
data.tar.gz: 65e623ddcc212a84ed9b0d298674738a4398a37f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec8fc50a1474c128b48e6cf53f734bd159f975587841d163169a8b19b1da9319f466b5e1b4cde6ef1ff8be931ca04eea17349602ede0ce60ab4b9af1a5af7702
|
7
|
+
data.tar.gz: 9b32af943a44ba5ce43e2f7fcea76b36b3749ca6d32402d6c37e838a838e52c81806dfcc68913b3e5f25a242b7e53608a6173eea3a9fc5f68cb709b11d1bec23
|
data/CHANGES.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## [1.0.8] - 2016-09-30
|
6
|
+
### Fixes
|
7
|
+
Fixed a bug with rounding Fixnums in CVSS3.
|
8
|
+
|
5
9
|
## [1.0.7] - 2016-06-23
|
6
10
|
### Improvements
|
7
11
|
Removed gems: Rake & badgerbadgerbadger. Improved documentation, webpage (github) is coming very soon!
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
|
3
|
+
Copyright (c) Siemens AG, 2016
|
4
|
+
|
5
|
+
Authors: Oliver Hambörger <oliver.hamboerger@siemens.com>
|
6
|
+
|
7
|
+
This work is licensed under the terms of the MIT license.
|
8
|
+
See the LICENSE.md file in the top-level directory.
|
9
|
+
|
1
10
|
# Contributor Covenant Code of Conduct
|
2
11
|
|
3
12
|
## Our Pledge
|
data/Gemfile
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
10
|
+
|
1
11
|
source 'https://rubygems.org'
|
2
12
|
|
3
13
|
# Specify your gem's dependencies in cvss_suite.gemspec
|
data/README.md
CHANGED
@@ -78,5 +78,5 @@ Because the documentation isn't clear on how to calculate the score if Modified
|
|
78
78
|
|
79
79
|
## Contributing
|
80
80
|
|
81
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/siemens/
|
81
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/siemens/cvss-suite. This project is intended to be a safe, welcoming space for collaboration.
|
82
82
|
|
data/cvss_suite.gemspec
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
10
|
+
|
1
11
|
# coding: utf-8
|
2
12
|
lib = File.expand_path('../lib', __FILE__)
|
3
13
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
@@ -12,9 +22,7 @@ Gem::Specification.new do |spec|
|
|
12
22
|
|
13
23
|
spec.summary = %q{Ruby gem for processing cvss vectors.}
|
14
24
|
spec.description = %q{This Ruby gem helps you to process the vector of the Common Vulnerability Scoring System (https://www.first.org/cvss/specification-document).
|
15
|
-
Besides calculating the Base, Temporal and Environmental Score, you are able to extract the selected option.
|
16
|
-
|
17
|
-
Homepage is still in progress and will be published soon (along with full documentation).}
|
25
|
+
Besides calculating the Base, Temporal and Environmental Score, you are able to extract the selected option.}
|
18
26
|
spec.homepage = "https://github.com/siemens/cvss-suite"
|
19
27
|
|
20
28
|
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
data/lib/cvss_suite.rb
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
require 'cvss_suite/cvss2/cvss2'
|
4
12
|
require 'cvss_suite/cvss3/cvss3'
|
data/lib/cvss_suite/cvss.rb
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
##
|
4
12
|
# This class represents any CVSS vector. Do not instantiate this class!
|
@@ -1,4 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
require_relative '../../../lib/cvss_suite/cvss'
|
4
12
|
require_relative 'cvss2_base'
|
@@ -1,4 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
require_relative '../cvss_property'
|
4
12
|
require_relative '../cvss_metric'
|
@@ -1,4 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
require_relative '../cvss_property'
|
4
12
|
require_relative '../cvss_metric'
|
@@ -1,4 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
require_relative '../cvss_property'
|
4
12
|
require_relative '../cvss_metric'
|
@@ -1,4 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
require_relative '../../../lib/cvss_suite/cvss'
|
4
12
|
require_relative 'cvss3_base'
|
@@ -1,4 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
require_relative '../cvss_property'
|
4
12
|
require_relative '../cvss_metric'
|
@@ -1,4 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
require_relative '../cvss_property'
|
4
12
|
require_relative '../cvss_metric'
|
@@ -1,4 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
require_relative '../cvss_property'
|
4
12
|
require_relative '../cvss_metric'
|
@@ -1,4 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
##
|
4
12
|
# This class represents any CVSS metric.
|
@@ -1,4 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
##
|
4
12
|
# This class represents a CVSS property of a CVSS metric.
|
@@ -1,4 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
##
|
4
12
|
# This module includes methods which are used by the CVSS 3 classes.
|
@@ -1,4 +1,12 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
##
|
4
12
|
# This class includes extensions for the Float datatype.
|
@@ -8,6 +16,16 @@ class Float
|
|
8
16
|
##
|
9
17
|
# Since CVSS 3 all float values are rounded up, therefore this method is used instead of the mathematically correct method round().
|
10
18
|
|
19
|
+
def round_up(decimal_paces = 0)
|
20
|
+
(self * 10.0**decimal_paces).ceil / 10.0**decimal_paces
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
class Fixnum
|
25
|
+
|
26
|
+
##
|
27
|
+
# Since CVSS 3 all float values are rounded up, therefore this method is used instead of the mathematically correct method round().
|
28
|
+
|
11
29
|
def round_up(decimal_paces = 0)
|
12
30
|
(self * 10.0**decimal_paces).ceil / 10.0**decimal_paces
|
13
31
|
end
|
data/lib/cvss_suite/version.rb
CHANGED
@@ -1,5 +1,13 @@
|
|
1
|
-
#
|
1
|
+
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
|
+
#
|
3
|
+
# Copyright (c) Siemens AG, 2016
|
4
|
+
#
|
5
|
+
# Authors:
|
6
|
+
# Oliver Hambörger <oliver.hamboerger@siemens.com>
|
7
|
+
#
|
8
|
+
# This work is licensed under the terms of the MIT license.
|
9
|
+
# See the LICENSE.md file in the top-level directory.
|
2
10
|
|
3
11
|
module CvssSuite
|
4
|
-
VERSION = "1.0.
|
12
|
+
VERSION = "1.0.8"
|
5
13
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cvss-suite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Hamboerger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -83,8 +83,6 @@ dependencies:
|
|
83
83
|
description: |-
|
84
84
|
This Ruby gem helps you to process the vector of the Common Vulnerability Scoring System (https://www.first.org/cvss/specification-document).
|
85
85
|
Besides calculating the Base, Temporal and Environmental Score, you are able to extract the selected option.
|
86
|
-
|
87
|
-
Homepage is still in progress and will be published soon (along with full documentation).
|
88
86
|
email:
|
89
87
|
- oliver.hamboerger@siemens.com
|
90
88
|
executables: []
|
@@ -100,7 +98,6 @@ files:
|
|
100
98
|
- Gemfile
|
101
99
|
- LICENSE.md
|
102
100
|
- README.md
|
103
|
-
- Rakefile
|
104
101
|
- bin/console
|
105
102
|
- bin/setup
|
106
103
|
- cvss_suite.gemspec
|