cvss-suite 4.1.1 → 4.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8cf95b45495f191e7155aad10bebc43b092f5173fb65adcf4d7434b01bb9cd5
4
- data.tar.gz: 7f3ffe1d5fc752d5f1da0b71bdb4211a0c538b8ce9f199328e93e83d640be594
3
+ metadata.gz: 7c7948321f189838f10d2972d03f027cef4e31b14531dacf93bb876b1b2bbcf5
4
+ data.tar.gz: d4c4163a0fb515583f82bc30c44e9c6f599c8fee861474e91a19eadfbc5ed0af
5
5
  SHA512:
6
- metadata.gz: 6d8a171815a4b9037dcd791b557f4d225a93a7a82dd8d497d461ef74883e4d4c68243b746fac5da8a3db8aa7dafb92d821c34ccdba6d9b16386fe87f0e9c3d33
7
- data.tar.gz: bc43b1151b310bbe245c09112e2911c344bffc8b62e3641be955139dcf4fb3021eb1093b008efad0f00b853959e521bd1c139c3ccd30947fe60899838386c7dd
6
+ metadata.gz: 618a8727b5459ef2a2b6f94fa3e53d3cd76bdab375f26d64cd2f544a300215061b7275ec26d97cc821ba3fec56a19aac82669202e7e2b6b5eba85208d46d11af
7
+ data.tar.gz: 4dc96ac39c2f2d55e3a3a462ad21f55b13ebe233430a905403571086cff22e21ada64e42423c238f7d9f12df6c44e88b500637fb5dbf5cee33b41a262750746a
@@ -8,7 +8,7 @@ jobs:
8
8
  runs-on: ubuntu-latest
9
9
  strategy:
10
10
  matrix:
11
- ruby: [ '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4' ]
11
+ ruby: [ '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4', '4.0' ]
12
12
  steps:
13
13
  - uses: actions/checkout@v4
14
14
  - name: Set up ${{ matrix.ruby }}
data/.rubocop.yml CHANGED
@@ -45,6 +45,7 @@ Metrics/BlockLength:
45
45
  - 'spec/cvss3/cvss3_spec.rb'
46
46
  - 'spec/cvss31/cvss31_spec.rb'
47
47
  - 'spec/cvss40/cvss40_spec.rb'
48
+ - 'spec/cvss_metric_spec.rb'
48
49
 
49
50
  Style/IfUnlessModifier:
50
51
  Exclude:
data/CHANGES.md CHANGED
@@ -2,6 +2,17 @@
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
+ ## [4.1.3] - 2026-04-26
6
+
7
+ ### Fixes
8
+
9
+ See [v4.1.3](https://github.com/0llirocks/cvss-suite/releases/tag/v4.1.3). (@sachin-sandhu)
10
+
11
+ ## [4.1.2] - 2025-12-05
12
+
13
+ ### Improvements
14
+ * Relax the dependency requirement for bigdecimal, now compatible with all versions below 4.x. (@sachin-sandhu)
15
+
5
16
  ## [4.1.1] - 2025-05-11
6
17
 
7
18
  ### Fixes
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/cvss_suite.gemspec CHANGED
@@ -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', '~> 3.1.8'
40
+ spec.add_dependency 'bigdecimal', '~> 3.1'
41
41
 
42
42
  spec.add_development_dependency 'bundler', '2.4.22'
43
43
  spec.add_development_dependency 'csv', '~> 3.3'
@@ -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.valid? && !@environmental.valid?
44
- return environmental_score if @environmental.valid?
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
@@ -4,5 +4,5 @@
4
4
  # See the LICENSE.md file in the top-level directory.
5
5
 
6
6
  module CvssSuite
7
- VERSION = '4.1.1'.freeze
7
+ VERSION = '4.1.3'.freeze
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cvss-suite
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.1
4
+ version: 4.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0llirocks
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-05-11 00:00:00.000000000 Z
10
+ date: 2026-04-26 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bigdecimal
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 3.1.8
18
+ version: '3.1'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 3.1.8
25
+ version: '3.1'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: bundler
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -176,7 +176,7 @@ licenses:
176
176
  metadata:
177
177
  bug_tracker_uri: https://github.com/0llirocks/cvss-suite/issues
178
178
  changelog_uri: https://github.com/0llirocks/cvss-suite/blob/master/CHANGES.md
179
- documentation_uri: https://www.rubydoc.info/gems/cvss-suite/4.1.1
179
+ documentation_uri: https://www.rubydoc.info/gems/cvss-suite/4.1.3
180
180
  homepage_uri: https://cvss-suite.0lli.rocks
181
181
  source_code_uri: https://github.com/0llirocks/cvss-suite
182
182
  rdoc_options: []