cvss-suite 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rspec.yml +2 -2
- data/CHANGES.md +5 -0
- data/README.md +6 -0
- data/lib/cvss_suite/cvss.rb +7 -5
- data/lib/cvss_suite/cvss3/cvss3.rb +7 -1
- data/lib/cvss_suite/cvss31/cvss31.rb +7 -1
- data/lib/cvss_suite/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9474da7f6ca4ff4f9016d55b23714c1a5ca7e1a6a1fce6e4fb74fddbda9ea757
|
4
|
+
data.tar.gz: a581c242701b79f72ef2b97208ab9a0524942dcba8ddca75a0df7b5ef0b36c71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e3d15e35b59915b919faa4b99d3ff8a43d9b9ab231a9993e6b1876cd8b0c55ead7c73d0078a011245ebf40e6fa88f0abc9936eeb7af48c4972df8252d97e037
|
7
|
+
data.tar.gz: e061ce21c13ad6759b3b54f01d3330b339322213cf103fbe1350185da8dbf621d6a22ba211fd882fc174daec62ea42695a79ae37511adbe863b6b48fc75b4af2
|
data/.github/workflows/rspec.yml
CHANGED
@@ -8,9 +8,9 @@ jobs:
|
|
8
8
|
runs-on: ubuntu-latest
|
9
9
|
strategy:
|
10
10
|
matrix:
|
11
|
-
ruby: [ '2.6', '2.7', '3.0', '3.1' ]
|
11
|
+
ruby: [ '2.6', '2.7', '3.0', '3.1', '3.2' ]
|
12
12
|
steps:
|
13
|
-
- uses: actions/checkout@
|
13
|
+
- uses: actions/checkout@v3
|
14
14
|
- name: Set up ${{ matrix.ruby }}
|
15
15
|
uses: ruby/setup-ruby@v1
|
16
16
|
with:
|
data/CHANGES.md
CHANGED
@@ -2,6 +2,11 @@
|
|
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
|
+
## [3.1.1] - 2023-10-15
|
6
|
+
|
7
|
+
### Fixes
|
8
|
+
* CVSS prefix is missing in v3.1.0. Fixes [#33](https://github.com/0llirocks/cvss-suite/issues/33)
|
9
|
+
|
5
10
|
## [3.1.0] - 2022-09-27
|
6
11
|
|
7
12
|
### Fixes
|
data/README.md
CHANGED
@@ -18,6 +18,12 @@ Add this line to your application's Gemfile:
|
|
18
18
|
gem 'cvss-suite'
|
19
19
|
```
|
20
20
|
|
21
|
+
Since the naming of this gem is not following the naming convention you can also add the following line to automatically require the gem:
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
gem 'cvss-suite', require: 'cvss_suite'
|
25
|
+
```
|
26
|
+
|
21
27
|
And then execute:
|
22
28
|
|
23
29
|
$ bundle
|
data/lib/cvss_suite/cvss.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
2
|
#
|
3
3
|
# Copyright (c) 2016-2022 Siemens AG
|
4
|
-
# Copyright (c) 2022 0llirocks
|
4
|
+
# Copyright (c) 2022-2023 0llirocks
|
5
5
|
#
|
6
6
|
# Authors:
|
7
7
|
# 0llirocks <http://0lli.rocks>
|
@@ -17,10 +17,6 @@ module CvssSuite
|
|
17
17
|
# Metric of a CVSS vector.
|
18
18
|
attr_reader :base, :temporal, :environmental
|
19
19
|
|
20
|
-
##
|
21
|
-
# Returns the vector itself.
|
22
|
-
attr_reader :vector
|
23
|
-
|
24
20
|
##
|
25
21
|
# Creates a new CVSS vector by a +vector+.
|
26
22
|
#
|
@@ -80,6 +76,12 @@ module CvssSuite
|
|
80
76
|
base_score
|
81
77
|
end
|
82
78
|
|
79
|
+
##
|
80
|
+
# Returns the vector itself.
|
81
|
+
def vector
|
82
|
+
@vector.to_s
|
83
|
+
end
|
84
|
+
|
83
85
|
private
|
84
86
|
|
85
87
|
def extract_metrics
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
2
|
#
|
3
3
|
# Copyright (c) 2016-2022 Siemens AG
|
4
|
-
# Copyright (c) 2022 0llirocks
|
4
|
+
# Copyright (c) 2022-2023 0llirocks
|
5
5
|
#
|
6
6
|
# Authors:
|
7
7
|
# 0llirocks <http://0lli.rocks>
|
@@ -45,6 +45,12 @@ module CvssSuite
|
|
45
45
|
Cvss3Helper.round_up(@environmental.score(@base, @temporal))
|
46
46
|
end
|
47
47
|
|
48
|
+
##
|
49
|
+
# Returns the vector itself.
|
50
|
+
def vector
|
51
|
+
"#{CvssSuite::CVSS_VECTOR_BEGINNINGS.find { |beginning| beginning[:version] == version }[:string]}#{@vector}"
|
52
|
+
end
|
53
|
+
|
48
54
|
private
|
49
55
|
|
50
56
|
def init_metrics
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
2
|
#
|
3
3
|
# Copyright (c) 2019-2022 Siemens AG
|
4
|
-
# Copyright (c) 2022 0llirocks
|
4
|
+
# Copyright (c) 2022-2023 0llirocks
|
5
5
|
#
|
6
6
|
# Authors:
|
7
7
|
# 0llirocks <http://0lli.rocks>
|
@@ -50,6 +50,12 @@ module CvssSuite
|
|
50
50
|
Cvss31Helper.round_up(@environmental.score(@base, @temporal))
|
51
51
|
end
|
52
52
|
|
53
|
+
##
|
54
|
+
# Returns the vector itself.
|
55
|
+
def vector
|
56
|
+
"#{CvssSuite::CVSS_VECTOR_BEGINNINGS.find { |beginning| beginning[:version] == version }[:string]}#{@vector}"
|
57
|
+
end
|
58
|
+
|
53
59
|
private
|
54
60
|
|
55
61
|
def init_metrics
|
data/lib/cvss_suite/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
2
2
|
#
|
3
3
|
# Copyright (c) 2016-2022 Siemens AG
|
4
|
-
# Copyright (c) 2022 0llirocks
|
4
|
+
# Copyright (c) 2022-2023 0llirocks
|
5
5
|
#
|
6
6
|
# Authors:
|
7
7
|
# 0llirocks <http://0lli.rocks>
|
@@ -10,5 +10,5 @@
|
|
10
10
|
# See the LICENSE.md file in the top-level directory.
|
11
11
|
|
12
12
|
module CvssSuite
|
13
|
-
VERSION = '3.1.
|
13
|
+
VERSION = '3.1.1'.freeze
|
14
14
|
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: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0llirocks
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -121,7 +121,7 @@ licenses:
|
|
121
121
|
metadata:
|
122
122
|
bug_tracker_uri: https://github.com/0llirocks/cvss-suite/issues
|
123
123
|
changelog_uri: https://github.com/0llirocks/cvss-suite/blob/master/CHANGES.md
|
124
|
-
documentation_uri: https://www.rubydoc.info/gems/cvss-suite/3.1.
|
124
|
+
documentation_uri: https://www.rubydoc.info/gems/cvss-suite/3.1.1
|
125
125
|
homepage_uri: https://cvss-suite.0lli.rocks
|
126
126
|
source_code_uri: https://github.com/0llirocks/cvss-suite
|
127
127
|
post_install_message:
|