cvss-suite 4.1.2 → 4.1.4
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/.github/workflows/push.yml +32 -0
- data/.github/workflows/rspec.yml +1 -1
- data/.rubocop.yml +1 -0
- data/CHANGES.md +15 -0
- data/LICENSE.md +2 -1
- data/Rakefile +2 -0
- data/cvss_suite.gemspec +3 -2
- data/lib/cvss_suite/cvss_31_and_before.rb +2 -2
- data/lib/cvss_suite/cvss_metric.rb +11 -0
- data/lib/cvss_suite/version.rb +1 -1
- metadata +29 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c3efb3fc75b7c4cc0428b409767c3abc83c2efa00b0dce57597c933fd2e233f3
|
|
4
|
+
data.tar.gz: ec150b5056b70c831088d49028c69e846dff6194e4043dde7fe5d31235c18613
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 49532a6b6954c2b12734990897134beec7c8ccbadb2420111dc7c32a4858ed7a03a691226e879144f75fbdd1dc6f4e67351907d3e2f11606db8235d829394fbe
|
|
7
|
+
data.tar.gz: 6ffd130cc5107b9aeec32eb37601ef50c8c55001fe20553e46c2b82f353e72b15f4ce089f2c75959d5f9e51df63db5ea3f8795410261549cedf4f3c5fd41b798
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Push gem
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
push:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
id-token: write
|
|
15
|
+
|
|
16
|
+
# If you configured a GitHub environment on RubyGems, you must use it here.
|
|
17
|
+
environment: release
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
# Set up
|
|
21
|
+
- uses: actions/checkout@v5
|
|
22
|
+
with:
|
|
23
|
+
persist-credentials: false
|
|
24
|
+
- name: Set up Ruby
|
|
25
|
+
uses: ruby/setup-ruby@v1
|
|
26
|
+
with:
|
|
27
|
+
bundler-cache: true
|
|
28
|
+
ruby-version: ruby
|
|
29
|
+
bundler: 2.4.22
|
|
30
|
+
|
|
31
|
+
# Release
|
|
32
|
+
- uses: rubygems/release-gem@v1
|
data/.github/workflows/rspec.yml
CHANGED
data/.rubocop.yml
CHANGED
data/CHANGES.md
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
|
+
> [!WARNING]
|
|
2
|
+
> Starting with version 5.0.0, changes are no longer documented in this file. Please see the [Releases page](../../releases) for the changelog going forward.
|
|
3
|
+
|
|
1
4
|
# Change Log
|
|
2
5
|
All notable changes to this project will be documented in this file.
|
|
3
6
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
7
|
|
|
8
|
+
## [4.1.4] - 2026-07-05
|
|
9
|
+
|
|
10
|
+
### Fixes
|
|
11
|
+
|
|
12
|
+
Support BigDecimal 4.0 [#60](https://github.com/0llirocks/cvss-suite/pull/60). (@Bo98)
|
|
13
|
+
|
|
14
|
+
## [4.1.3] - 2026-04-26
|
|
15
|
+
|
|
16
|
+
### Fixes
|
|
17
|
+
|
|
18
|
+
See [v4.1.3](https://github.com/0llirocks/cvss-suite/releases/tag/v4.1.3). (@sachin-sandhu)
|
|
19
|
+
|
|
5
20
|
## [4.1.2] - 2025-12-05
|
|
6
21
|
|
|
7
22
|
### Improvements
|
data/LICENSE.md
CHANGED
|
@@ -14,6 +14,7 @@ Contributors:
|
|
|
14
14
|
- Karim ElGhandour <https://github.com/kghandour>
|
|
15
15
|
- Adam Hess <https://github.com/HParker>
|
|
16
16
|
- Jason Garber <https://github.com/jgarber>
|
|
17
|
+
- Sachin Sandhu <https://github.com/sachin-sandhu>
|
|
17
18
|
|
|
18
19
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
19
20
|
this software and associated documentation files (the "Software"), to deal in
|
|
@@ -30,4 +31,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
|
30
31
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
31
32
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
32
33
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
33
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
34
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
data/cvss_suite.gemspec
CHANGED
|
@@ -24,7 +24,7 @@ in version 4.0, 3.1, 3.0 and 2.'
|
|
|
24
24
|
|
|
25
25
|
spec.metadata = {
|
|
26
26
|
'bug_tracker_uri' => 'https://github.com/0llirocks/cvss-suite/issues',
|
|
27
|
-
'changelog_uri' => 'https://github.com/0llirocks/cvss-suite/
|
|
27
|
+
'changelog_uri' => 'https://github.com/0llirocks/cvss-suite/releases',
|
|
28
28
|
'documentation_uri' => "https://www.rubydoc.info/gems/cvss-suite/#{CvssSuite::VERSION}",
|
|
29
29
|
'homepage_uri' => 'https://cvss-suite.0lli.rocks',
|
|
30
30
|
'source_code_uri' => 'https://github.com/0llirocks/cvss-suite'
|
|
@@ -37,7 +37,7 @@ in version 4.0, 3.1, 3.0 and 2.'
|
|
|
37
37
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
38
38
|
spec.require_paths = ['lib']
|
|
39
39
|
|
|
40
|
-
spec.add_dependency 'bigdecimal', '
|
|
40
|
+
spec.add_dependency 'bigdecimal', '>= 3.1', '< 5'
|
|
41
41
|
|
|
42
42
|
spec.add_development_dependency 'bundler', '2.4.22'
|
|
43
43
|
spec.add_development_dependency 'csv', '~> 3.3'
|
|
@@ -45,4 +45,5 @@ in version 4.0, 3.1, 3.0 and 2.'
|
|
|
45
45
|
spec.add_development_dependency 'rspec-its', '~> 1.2'
|
|
46
46
|
spec.add_development_dependency 'rubocop', '1.50.2'
|
|
47
47
|
spec.add_development_dependency 'simplecov', '~> 0.18'
|
|
48
|
+
spec.add_development_dependency 'rake'
|
|
48
49
|
end
|
|
@@ -40,8 +40,8 @@ module CvssSuite
|
|
|
40
40
|
# Returns the Overall Score of the CVSS vector.
|
|
41
41
|
def overall_score
|
|
42
42
|
check_validity
|
|
43
|
-
return temporal_score if @temporal.
|
|
44
|
-
return environmental_score if @environmental.
|
|
43
|
+
return temporal_score if @temporal.explicitly_provided? && !@environmental.explicitly_provided?
|
|
44
|
+
return environmental_score if @environmental.explicitly_provided?
|
|
45
45
|
|
|
46
46
|
base_score
|
|
47
47
|
end
|
|
@@ -24,6 +24,17 @@ module CvssSuite
|
|
|
24
24
|
true
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
##
|
|
28
|
+
# Returns if any property in this metric was explicitly provided
|
|
29
|
+
# (i.e., set to a value other than the default 'X' or 'ND').
|
|
30
|
+
def explicitly_provided?
|
|
31
|
+
@properties.any? do |property|
|
|
32
|
+
property.valid? &&
|
|
33
|
+
property.selected_value[:abbreviation] != 'X' &&
|
|
34
|
+
property.selected_value[:abbreviation] != 'ND'
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
27
38
|
##
|
|
28
39
|
# Returns number of properties for this metric.
|
|
29
40
|
def count
|
data/lib/cvss_suite/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cvss-suite
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.1.
|
|
4
|
+
version: 4.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 0llirocks
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: bigdecimal
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
15
15
|
requirements:
|
|
16
|
-
- - "
|
|
16
|
+
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
18
|
version: '3.1'
|
|
19
|
+
- - "<"
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '5'
|
|
19
22
|
type: :runtime
|
|
20
23
|
prerelease: false
|
|
21
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
25
|
requirements:
|
|
23
|
-
- - "
|
|
26
|
+
- - ">="
|
|
24
27
|
- !ruby/object:Gem::Version
|
|
25
28
|
version: '3.1'
|
|
29
|
+
- - "<"
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '5'
|
|
26
32
|
- !ruby/object:Gem::Dependency
|
|
27
33
|
name: bundler
|
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -107,6 +113,20 @@ dependencies:
|
|
|
107
113
|
- - "~>"
|
|
108
114
|
- !ruby/object:Gem::Version
|
|
109
115
|
version: '0.18'
|
|
116
|
+
- !ruby/object:Gem::Dependency
|
|
117
|
+
name: rake
|
|
118
|
+
requirement: !ruby/object:Gem::Requirement
|
|
119
|
+
requirements:
|
|
120
|
+
- - ">="
|
|
121
|
+
- !ruby/object:Gem::Version
|
|
122
|
+
version: '0'
|
|
123
|
+
type: :development
|
|
124
|
+
prerelease: false
|
|
125
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
126
|
+
requirements:
|
|
127
|
+
- - ">="
|
|
128
|
+
- !ruby/object:Gem::Version
|
|
129
|
+
version: '0'
|
|
110
130
|
description: |-
|
|
111
131
|
This Ruby gem calculates the score based on the vector of the
|
|
112
132
|
Common Vulnerability Scoring System (https://www.first.org/cvss/specification-document)
|
|
@@ -118,6 +138,7 @@ files:
|
|
|
118
138
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
|
119
139
|
- ".github/ISSUE_TEMPLATE/custom.md"
|
|
120
140
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
|
141
|
+
- ".github/workflows/push.yml"
|
|
121
142
|
- ".github/workflows/rspec.yml"
|
|
122
143
|
- ".github/workflows/rubocop.yml"
|
|
123
144
|
- ".gitignore"
|
|
@@ -131,6 +152,7 @@ files:
|
|
|
131
152
|
- LICENSE.md
|
|
132
153
|
- PULL_REQUEST_TEMPLATE.md
|
|
133
154
|
- README.md
|
|
155
|
+
- Rakefile
|
|
134
156
|
- _config.yml
|
|
135
157
|
- bin/console
|
|
136
158
|
- bin/setup
|
|
@@ -175,8 +197,8 @@ licenses:
|
|
|
175
197
|
- MIT
|
|
176
198
|
metadata:
|
|
177
199
|
bug_tracker_uri: https://github.com/0llirocks/cvss-suite/issues
|
|
178
|
-
changelog_uri: https://github.com/0llirocks/cvss-suite/
|
|
179
|
-
documentation_uri: https://www.rubydoc.info/gems/cvss-suite/4.1.
|
|
200
|
+
changelog_uri: https://github.com/0llirocks/cvss-suite/releases
|
|
201
|
+
documentation_uri: https://www.rubydoc.info/gems/cvss-suite/4.1.4
|
|
180
202
|
homepage_uri: https://cvss-suite.0lli.rocks
|
|
181
203
|
source_code_uri: https://github.com/0llirocks/cvss-suite
|
|
182
204
|
rdoc_options: []
|
|
@@ -193,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
193
215
|
- !ruby/object:Gem::Version
|
|
194
216
|
version: '0'
|
|
195
217
|
requirements: []
|
|
196
|
-
rubygems_version:
|
|
218
|
+
rubygems_version: 4.0.10
|
|
197
219
|
specification_version: 4
|
|
198
220
|
summary: Ruby gem for processing cvss vectors.
|
|
199
221
|
test_files: []
|