cvss-suite 4.1.4 → 5.0.0
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 → CHANGELOG.md} +30 -3
- data/LICENSE.md +2 -1
- data/README.md +80 -99
- data/docs/upgrading-to-5.md +117 -0
- data/docs/usage.md +234 -0
- data/lib/cvss_suite/cvss.rb +20 -3
- data/lib/cvss_suite/cvss2/cvss2.rb +3 -0
- data/lib/cvss_suite/cvss2/cvss2_base.rb +15 -4
- data/lib/cvss_suite/cvss2/cvss2_environmental.rb +3 -1
- data/lib/cvss_suite/cvss2/cvss2_temporal.rb +2 -0
- data/lib/cvss_suite/cvss3/cvss3.rb +4 -0
- data/lib/cvss_suite/cvss3/cvss3_base.rb +11 -1
- data/lib/cvss_suite/cvss3/cvss3_environmental.rb +43 -60
- data/lib/cvss_suite/cvss3/cvss3_temporal.rb +2 -0
- data/lib/cvss_suite/cvss31/cvss31.rb +4 -0
- data/lib/cvss_suite/cvss31/cvss31_base.rb +15 -1
- data/lib/cvss_suite/cvss31/cvss31_environmental.rb +46 -60
- data/lib/cvss_suite/cvss31/cvss31_temporal.rb +2 -0
- data/lib/cvss_suite/cvss40/cvss40.rb +10 -0
- data/lib/cvss_suite/cvss40/cvss40_all_up.rb +3 -1
- data/lib/cvss_suite/cvss40/cvss40_base.rb +8 -0
- data/lib/cvss_suite/cvss40/cvss40_calc_helper.rb +12 -8
- data/lib/cvss_suite/cvss40/cvss40_constants_levels.rb +2 -0
- data/lib/cvss_suite/cvss40/cvss40_constants_macro_vector_lookup.rb +2 -0
- data/lib/cvss_suite/cvss40/cvss40_constants_max_composed.rb +2 -0
- data/lib/cvss_suite/cvss40/cvss40_constants_max_severity.rb +2 -0
- data/lib/cvss_suite/cvss40/cvss40_environmental.rb +2 -0
- data/lib/cvss_suite/cvss40/cvss40_environmental_security.rb +2 -0
- data/lib/cvss_suite/cvss40/cvss40_supplemental.rb +2 -0
- data/lib/cvss_suite/cvss40/cvss40_threat.rb +2 -0
- data/lib/cvss_suite/cvss_31_and_before.rb +5 -3
- data/lib/cvss_suite/cvss_40_and_later.rb +3 -1
- data/lib/cvss_suite/cvss_metric.rb +4 -2
- data/lib/cvss_suite/cvss_property.rb +8 -6
- data/lib/cvss_suite/errors.rb +75 -9
- data/lib/cvss_suite/helpers/cvss31_helper.rb +6 -0
- data/lib/cvss_suite/helpers/cvss3_helper.rb +4 -0
- data/lib/cvss_suite/invalid_cvss.rb +26 -2
- data/lib/cvss_suite/version.rb +3 -1
- data/lib/cvss_suite.rb +86 -13
- metadata +9 -129
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -21
- data/.github/ISSUE_TEMPLATE/custom.md +0 -7
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -17
- data/.github/workflows/push.yml +0 -32
- data/.github/workflows/rspec.yml +0 -23
- data/.github/workflows/rubocop.yml +0 -21
- data/.gitignore +0 -14
- data/.rspec +0 -3
- data/.rubocop.yml +0 -69
- data/.rubocop_todo.yml +0 -59
- data/CNAME +0 -1
- data/CODE_OF_CONDUCT.md +0 -79
- data/Gemfile +0 -9
- data/PULL_REQUEST_TEMPLATE.md +0 -24
- data/Rakefile +0 -2
- data/_config.yml +0 -1
- data/bin/console +0 -14
- data/bin/setup +0 -7
- data/cvss_suite.gemspec +0 -49
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cvss-suite
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 5.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 0llirocks
|
|
@@ -16,9 +16,6 @@ dependencies:
|
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
18
|
version: '3.1'
|
|
19
|
-
- - "<"
|
|
20
|
-
- !ruby/object:Gem::Version
|
|
21
|
-
version: '5'
|
|
22
19
|
type: :runtime
|
|
23
20
|
prerelease: false
|
|
24
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -26,107 +23,6 @@ dependencies:
|
|
|
26
23
|
- - ">="
|
|
27
24
|
- !ruby/object:Gem::Version
|
|
28
25
|
version: '3.1'
|
|
29
|
-
- - "<"
|
|
30
|
-
- !ruby/object:Gem::Version
|
|
31
|
-
version: '5'
|
|
32
|
-
- !ruby/object:Gem::Dependency
|
|
33
|
-
name: bundler
|
|
34
|
-
requirement: !ruby/object:Gem::Requirement
|
|
35
|
-
requirements:
|
|
36
|
-
- - '='
|
|
37
|
-
- !ruby/object:Gem::Version
|
|
38
|
-
version: 2.4.22
|
|
39
|
-
type: :development
|
|
40
|
-
prerelease: false
|
|
41
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
42
|
-
requirements:
|
|
43
|
-
- - '='
|
|
44
|
-
- !ruby/object:Gem::Version
|
|
45
|
-
version: 2.4.22
|
|
46
|
-
- !ruby/object:Gem::Dependency
|
|
47
|
-
name: csv
|
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
|
49
|
-
requirements:
|
|
50
|
-
- - "~>"
|
|
51
|
-
- !ruby/object:Gem::Version
|
|
52
|
-
version: '3.3'
|
|
53
|
-
type: :development
|
|
54
|
-
prerelease: false
|
|
55
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
56
|
-
requirements:
|
|
57
|
-
- - "~>"
|
|
58
|
-
- !ruby/object:Gem::Version
|
|
59
|
-
version: '3.3'
|
|
60
|
-
- !ruby/object:Gem::Dependency
|
|
61
|
-
name: rspec
|
|
62
|
-
requirement: !ruby/object:Gem::Requirement
|
|
63
|
-
requirements:
|
|
64
|
-
- - "~>"
|
|
65
|
-
- !ruby/object:Gem::Version
|
|
66
|
-
version: '3.4'
|
|
67
|
-
type: :development
|
|
68
|
-
prerelease: false
|
|
69
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
70
|
-
requirements:
|
|
71
|
-
- - "~>"
|
|
72
|
-
- !ruby/object:Gem::Version
|
|
73
|
-
version: '3.4'
|
|
74
|
-
- !ruby/object:Gem::Dependency
|
|
75
|
-
name: rspec-its
|
|
76
|
-
requirement: !ruby/object:Gem::Requirement
|
|
77
|
-
requirements:
|
|
78
|
-
- - "~>"
|
|
79
|
-
- !ruby/object:Gem::Version
|
|
80
|
-
version: '1.2'
|
|
81
|
-
type: :development
|
|
82
|
-
prerelease: false
|
|
83
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
84
|
-
requirements:
|
|
85
|
-
- - "~>"
|
|
86
|
-
- !ruby/object:Gem::Version
|
|
87
|
-
version: '1.2'
|
|
88
|
-
- !ruby/object:Gem::Dependency
|
|
89
|
-
name: rubocop
|
|
90
|
-
requirement: !ruby/object:Gem::Requirement
|
|
91
|
-
requirements:
|
|
92
|
-
- - '='
|
|
93
|
-
- !ruby/object:Gem::Version
|
|
94
|
-
version: 1.50.2
|
|
95
|
-
type: :development
|
|
96
|
-
prerelease: false
|
|
97
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
98
|
-
requirements:
|
|
99
|
-
- - '='
|
|
100
|
-
- !ruby/object:Gem::Version
|
|
101
|
-
version: 1.50.2
|
|
102
|
-
- !ruby/object:Gem::Dependency
|
|
103
|
-
name: simplecov
|
|
104
|
-
requirement: !ruby/object:Gem::Requirement
|
|
105
|
-
requirements:
|
|
106
|
-
- - "~>"
|
|
107
|
-
- !ruby/object:Gem::Version
|
|
108
|
-
version: '0.18'
|
|
109
|
-
type: :development
|
|
110
|
-
prerelease: false
|
|
111
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
112
|
-
requirements:
|
|
113
|
-
- - "~>"
|
|
114
|
-
- !ruby/object:Gem::Version
|
|
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'
|
|
130
26
|
description: |-
|
|
131
27
|
This Ruby gem calculates the score based on the vector of the
|
|
132
28
|
Common Vulnerability Scoring System (https://www.first.org/cvss/specification-document)
|
|
@@ -135,28 +31,11 @@ executables: []
|
|
|
135
31
|
extensions: []
|
|
136
32
|
extra_rdoc_files: []
|
|
137
33
|
files:
|
|
138
|
-
-
|
|
139
|
-
- ".github/ISSUE_TEMPLATE/custom.md"
|
|
140
|
-
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
|
141
|
-
- ".github/workflows/push.yml"
|
|
142
|
-
- ".github/workflows/rspec.yml"
|
|
143
|
-
- ".github/workflows/rubocop.yml"
|
|
144
|
-
- ".gitignore"
|
|
145
|
-
- ".rspec"
|
|
146
|
-
- ".rubocop.yml"
|
|
147
|
-
- ".rubocop_todo.yml"
|
|
148
|
-
- CHANGES.md
|
|
149
|
-
- CNAME
|
|
150
|
-
- CODE_OF_CONDUCT.md
|
|
151
|
-
- Gemfile
|
|
34
|
+
- CHANGELOG.md
|
|
152
35
|
- LICENSE.md
|
|
153
|
-
- PULL_REQUEST_TEMPLATE.md
|
|
154
36
|
- README.md
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
- bin/console
|
|
158
|
-
- bin/setup
|
|
159
|
-
- cvss_suite.gemspec
|
|
37
|
+
- docs/upgrading-to-5.md
|
|
38
|
+
- docs/usage.md
|
|
160
39
|
- lib/cvss_suite.rb
|
|
161
40
|
- lib/cvss_suite/cvss.rb
|
|
162
41
|
- lib/cvss_suite/cvss2/cvss2.rb
|
|
@@ -197,10 +76,11 @@ licenses:
|
|
|
197
76
|
- MIT
|
|
198
77
|
metadata:
|
|
199
78
|
bug_tracker_uri: https://github.com/0llirocks/cvss-suite/issues
|
|
200
|
-
changelog_uri: https://github.com/0llirocks/cvss-suite/
|
|
201
|
-
documentation_uri: https://www.rubydoc.info/gems/cvss-suite/
|
|
79
|
+
changelog_uri: https://github.com/0llirocks/cvss-suite/blob/master/CHANGELOG.md
|
|
80
|
+
documentation_uri: https://www.rubydoc.info/gems/cvss-suite/5.0.0
|
|
202
81
|
homepage_uri: https://cvss-suite.0lli.rocks
|
|
203
82
|
source_code_uri: https://github.com/0llirocks/cvss-suite
|
|
83
|
+
rubygems_mfa_required: 'true'
|
|
204
84
|
rdoc_options: []
|
|
205
85
|
require_paths:
|
|
206
86
|
- lib
|
|
@@ -208,14 +88,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
208
88
|
requirements:
|
|
209
89
|
- - ">="
|
|
210
90
|
- !ruby/object:Gem::Version
|
|
211
|
-
version:
|
|
91
|
+
version: '3.3'
|
|
212
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
93
|
requirements:
|
|
214
94
|
- - ">="
|
|
215
95
|
- !ruby/object:Gem::Version
|
|
216
96
|
version: '0'
|
|
217
97
|
requirements: []
|
|
218
|
-
rubygems_version: 4.0.
|
|
98
|
+
rubygems_version: 4.0.16
|
|
219
99
|
specification_version: 4
|
|
220
100
|
summary: Ruby gem for processing cvss vectors.
|
|
221
101
|
test_files: []
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Bug report
|
|
3
|
-
about: Create a report to help us improve
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
### Subject of the issue
|
|
8
|
-
Describe your issue here.
|
|
9
|
-
|
|
10
|
-
### Your environment
|
|
11
|
-
* version of cvss-suite gem
|
|
12
|
-
* version of ruby
|
|
13
|
-
|
|
14
|
-
### Steps to reproduce
|
|
15
|
-
Tell us how to reproduce this issue. Please provide a working demo.
|
|
16
|
-
|
|
17
|
-
### Expected behaviour
|
|
18
|
-
Tell us what should happen.
|
|
19
|
-
|
|
20
|
-
### Actual behaviour
|
|
21
|
-
Tell us what happens instead.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Feature request
|
|
3
|
-
about: Suggest an idea for this project
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
**Is your feature request related to a problem? Please describe.**
|
|
8
|
-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
9
|
-
|
|
10
|
-
**Describe the solution you'd like**
|
|
11
|
-
A clear and concise description of what you want to happen.
|
|
12
|
-
|
|
13
|
-
**Describe alternatives you've considered**
|
|
14
|
-
A clear and concise description of any alternative solutions or features you've considered.
|
|
15
|
-
|
|
16
|
-
**Additional context**
|
|
17
|
-
Add any other context or screenshots about the feature request here.
|
data/.github/workflows/push.yml
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
name: RSpec
|
|
2
|
-
|
|
3
|
-
on: [push,pull_request]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
build:
|
|
7
|
-
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
strategy:
|
|
10
|
-
matrix:
|
|
11
|
-
ruby: [ '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', '3.4', '4.0' ]
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v4
|
|
14
|
-
- name: Set up ${{ matrix.ruby }}
|
|
15
|
-
uses: ruby/setup-ruby@v1
|
|
16
|
-
with:
|
|
17
|
-
ruby-version: ${{ matrix.ruby }}
|
|
18
|
-
- name: Install gems
|
|
19
|
-
run: |
|
|
20
|
-
gem install bundler -v "2.4.22"
|
|
21
|
-
bundle _2.4.22_ install --jobs 4 --retry 3
|
|
22
|
-
- name: Run tests
|
|
23
|
-
run: bundle exec rspec spec
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
name: Rubocop
|
|
2
|
-
|
|
3
|
-
on: [push,pull_request]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
build:
|
|
7
|
-
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v4
|
|
12
|
-
- name: Set up Ruby 2.6
|
|
13
|
-
uses: ruby/setup-ruby@v1
|
|
14
|
-
with:
|
|
15
|
-
ruby-version: 2.6
|
|
16
|
-
- name: Install gems
|
|
17
|
-
run: |
|
|
18
|
-
gem install bundler -v "2.4.22"
|
|
19
|
-
bundle install --jobs 4 --retry 3
|
|
20
|
-
- name: Run checks
|
|
21
|
-
run: rubocop -F --fail-level C -f s
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
inherit_from: .rubocop_todo.yml
|
|
2
|
-
|
|
3
|
-
AllCops:
|
|
4
|
-
TargetRubyVersion: 2.6
|
|
5
|
-
SuggestExtensions: false
|
|
6
|
-
|
|
7
|
-
Metrics/AbcSize:
|
|
8
|
-
Exclude:
|
|
9
|
-
- 'lib/cvss_suite/cvss40/cvss40_calc_helper.rb'
|
|
10
|
-
|
|
11
|
-
Metrics/LineLength:
|
|
12
|
-
Max: 120
|
|
13
|
-
Exclude:
|
|
14
|
-
- 'lib/cvss_suite/cvss3/cvss3_environmental.rb'
|
|
15
|
-
- 'lib/cvss_suite/cvss31/cvss31_environmental.rb'
|
|
16
|
-
|
|
17
|
-
Metrics/ClassLength:
|
|
18
|
-
Exclude:
|
|
19
|
-
- 'lib/cvss_suite/cvss3/cvss3_environmental.rb'
|
|
20
|
-
- 'lib/cvss_suite/cvss31/cvss31_environmental.rb'
|
|
21
|
-
- 'lib/cvss_suite/cvss40/cvss40_calc_helper.rb'
|
|
22
|
-
|
|
23
|
-
Metrics/CyclomaticComplexity:
|
|
24
|
-
Exclude:
|
|
25
|
-
- 'lib/cvss_suite/cvss40/cvss40_calc_helper.rb'
|
|
26
|
-
|
|
27
|
-
Metrics/MethodLength:
|
|
28
|
-
Exclude:
|
|
29
|
-
- 'lib/cvss_suite/cvss3/cvss3_environmental.rb'
|
|
30
|
-
- 'lib/cvss_suite/cvss31/cvss31_environmental.rb'
|
|
31
|
-
- 'lib/cvss_suite/cvss40/cvss40_environmental.rb'
|
|
32
|
-
- 'lib/cvss_suite/cvss40/cvss40_calc_helper.rb'
|
|
33
|
-
|
|
34
|
-
Metrics/ModuleLength:
|
|
35
|
-
Exclude:
|
|
36
|
-
- 'lib/cvss_suite/cvss40/cvss40_constants_macro_vector_lookup.rb'
|
|
37
|
-
|
|
38
|
-
Metrics/PerceivedComplexity:
|
|
39
|
-
Exclude:
|
|
40
|
-
- 'lib/cvss_suite/cvss40/cvss40_calc_helper.rb'
|
|
41
|
-
|
|
42
|
-
Metrics/BlockLength:
|
|
43
|
-
Exclude:
|
|
44
|
-
- 'spec/cvss2/cvss2_spec.rb'
|
|
45
|
-
- 'spec/cvss3/cvss3_spec.rb'
|
|
46
|
-
- 'spec/cvss31/cvss31_spec.rb'
|
|
47
|
-
- 'spec/cvss40/cvss40_spec.rb'
|
|
48
|
-
- 'spec/cvss_metric_spec.rb'
|
|
49
|
-
|
|
50
|
-
Style/IfUnlessModifier:
|
|
51
|
-
Exclude:
|
|
52
|
-
- 'lib/cvss_suite/cvss3/cvss3_environmental.rb'
|
|
53
|
-
- 'lib/cvss_suite/cvss31/cvss31_environmental.rb'
|
|
54
|
-
|
|
55
|
-
Style/GuardClause:
|
|
56
|
-
Exclude:
|
|
57
|
-
- 'lib/cvss_suite/cvss3/cvss3_environmental.rb'
|
|
58
|
-
- 'lib/cvss_suite/cvss31/cvss31_environmental.rb'
|
|
59
|
-
|
|
60
|
-
Style/ConditionalAssignment:
|
|
61
|
-
Exclude:
|
|
62
|
-
- 'lib/cvss_suite/cvss3/cvss3_environmental.rb'
|
|
63
|
-
- 'lib/cvss_suite/cvss31/cvss31_environmental.rb'
|
|
64
|
-
|
|
65
|
-
Style/FrozenStringLiteralComment:
|
|
66
|
-
Enabled: false
|
|
67
|
-
|
|
68
|
-
Style/AsciiComments:
|
|
69
|
-
Enabled: false
|
data/.rubocop_todo.yml
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# This configuration was generated by
|
|
2
|
-
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2020-05-05 17:47:10 +0200 using RuboCop version 0.82.0.
|
|
4
|
-
# The point is for the user to remove these configuration records
|
|
5
|
-
# one by one as the offenses are removed from the code base.
|
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
|
8
|
-
|
|
9
|
-
# Offense count: 1
|
|
10
|
-
Lint/IneffectiveAccessModifier:
|
|
11
|
-
Exclude:
|
|
12
|
-
- 'lib/cvss_suite.rb'
|
|
13
|
-
|
|
14
|
-
# Offense count: 1
|
|
15
|
-
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
|
|
16
|
-
Lint/UselessAccessModifier:
|
|
17
|
-
Exclude:
|
|
18
|
-
- 'lib/cvss_suite.rb'
|
|
19
|
-
|
|
20
|
-
# Offense count: 8
|
|
21
|
-
# Configuration parameters: IgnoredMethods.
|
|
22
|
-
Metrics/AbcSize:
|
|
23
|
-
Max: 35
|
|
24
|
-
|
|
25
|
-
# Offense count: 5
|
|
26
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
|
27
|
-
# ExcludedMethods: refine
|
|
28
|
-
Metrics/BlockLength:
|
|
29
|
-
Max: 58
|
|
30
|
-
|
|
31
|
-
# Offense count: 2
|
|
32
|
-
# Configuration parameters: CountComments.
|
|
33
|
-
Metrics/ClassLength:
|
|
34
|
-
Max: 101
|
|
35
|
-
|
|
36
|
-
# Offense count: 1
|
|
37
|
-
# Configuration parameters: IgnoredMethods.
|
|
38
|
-
Metrics/CyclomaticComplexity:
|
|
39
|
-
Max: 13
|
|
40
|
-
|
|
41
|
-
# Offense count: 13
|
|
42
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
|
43
|
-
Metrics/MethodLength:
|
|
44
|
-
Max: 63
|
|
45
|
-
|
|
46
|
-
# Offense count: 1
|
|
47
|
-
# Configuration parameters: CountKeywordArgs.
|
|
48
|
-
Metrics/ParameterLists:
|
|
49
|
-
Max: 6
|
|
50
|
-
|
|
51
|
-
# Offense count: 1
|
|
52
|
-
# Configuration parameters: IgnoredMethods.
|
|
53
|
-
Metrics/PerceivedComplexity:
|
|
54
|
-
Max: 14
|
|
55
|
-
|
|
56
|
-
# Offense count: 1
|
|
57
|
-
Naming/AccessorMethodName:
|
|
58
|
-
Exclude:
|
|
59
|
-
- 'lib/cvss_suite/cvss_property.rb'
|
data/CNAME
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
cvss-suite.0lli.rocks
|
data/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
CVSS-Suite, a Ruby gem to manage the CVSS vector
|
|
2
|
-
|
|
3
|
-
This work is licensed under the terms of the MIT license.
|
|
4
|
-
See the LICENSE.md file in the top-level directory.
|
|
5
|
-
|
|
6
|
-
# Contributor Covenant Code of Conduct
|
|
7
|
-
|
|
8
|
-
## Our Pledge
|
|
9
|
-
|
|
10
|
-
In the interest of fostering an open and welcoming environment, we as
|
|
11
|
-
contributors and maintainers pledge to making participation in our project and
|
|
12
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
|
13
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
|
14
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
|
15
|
-
orientation.
|
|
16
|
-
|
|
17
|
-
## Our Standards
|
|
18
|
-
|
|
19
|
-
Examples of behavior that contributes to creating a positive environment
|
|
20
|
-
include:
|
|
21
|
-
|
|
22
|
-
* Using welcoming and inclusive language
|
|
23
|
-
* Being respectful of differing viewpoints and experiences
|
|
24
|
-
* Gracefully accepting constructive criticism
|
|
25
|
-
* Focusing on what is best for the community
|
|
26
|
-
* Showing empathy towards other community members
|
|
27
|
-
|
|
28
|
-
Examples of unacceptable behavior by participants include:
|
|
29
|
-
|
|
30
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
31
|
-
advances
|
|
32
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
33
|
-
* Public or private harassment
|
|
34
|
-
* Publishing others' private information, such as a physical or electronic
|
|
35
|
-
address, without explicit permission
|
|
36
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
-
professional setting
|
|
38
|
-
|
|
39
|
-
## Our Responsibilities
|
|
40
|
-
|
|
41
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
|
42
|
-
behavior and are expected to take appropriate and fair corrective action in
|
|
43
|
-
response to any instances of unacceptable behavior.
|
|
44
|
-
|
|
45
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
|
46
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
47
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
48
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
|
49
|
-
threatening, offensive, or harmful.
|
|
50
|
-
|
|
51
|
-
## Scope
|
|
52
|
-
|
|
53
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
|
54
|
-
when an individual is representing the project or its community. Examples of
|
|
55
|
-
representing a project or community include using an official project e-mail
|
|
56
|
-
address, posting via an official social media account, or acting as an appointed
|
|
57
|
-
representative at an online or offline event. Representation of a project may be
|
|
58
|
-
further defined and clarified by project maintainers.
|
|
59
|
-
|
|
60
|
-
## Enforcement
|
|
61
|
-
|
|
62
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
63
|
-
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
|
|
64
|
-
complaints will be reviewed and investigated and will result in a response that
|
|
65
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
|
66
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
67
|
-
Further details of specific enforcement policies may be posted separately.
|
|
68
|
-
|
|
69
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
70
|
-
faith may face temporary or permanent repercussions as determined by other
|
|
71
|
-
members of the project's leadership.
|
|
72
|
-
|
|
73
|
-
## Attribution
|
|
74
|
-
|
|
75
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
76
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
|
77
|
-
|
|
78
|
-
[homepage]: http://contributor-covenant.org
|
|
79
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
|
2
|
-
#
|
|
3
|
-
# This work is licensed under the terms of the MIT license.
|
|
4
|
-
# See the LICENSE.md file in the top-level directory.
|
|
5
|
-
|
|
6
|
-
source 'https://rubygems.org'
|
|
7
|
-
|
|
8
|
-
# Specify your gem's dependencies in cvss_suite.gemspec
|
|
9
|
-
gemspec
|
data/PULL_REQUEST_TEMPLATE.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
## Proposed changes
|
|
2
|
-
|
|
3
|
-
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
|
|
4
|
-
|
|
5
|
-
## Types of changes
|
|
6
|
-
|
|
7
|
-
What types of changes does your code introduce to CvssSuite?
|
|
8
|
-
_Put an `x` in the boxes that apply_
|
|
9
|
-
|
|
10
|
-
- [ ] Bugfix (non-breaking change which fixes an issue)
|
|
11
|
-
- [ ] New feature (non-breaking change which adds functionality)
|
|
12
|
-
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
13
|
-
|
|
14
|
-
## Checklist
|
|
15
|
-
|
|
16
|
-
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR._
|
|
17
|
-
|
|
18
|
-
- [ ] Unit tests pass locally with my changes
|
|
19
|
-
- [ ] I have added tests that prove my fix is effective or that my feature works
|
|
20
|
-
- [ ] I have added necessary documentation (if appropriate)
|
|
21
|
-
|
|
22
|
-
## Further comments
|
|
23
|
-
|
|
24
|
-
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
|
data/Rakefile
DELETED
data/_config.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
theme: jekyll-theme-cayman
|
data/bin/console
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require 'bundler/setup'
|
|
4
|
-
require 'cvss_suite'
|
|
5
|
-
|
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
-
|
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
-
# require "pry"
|
|
11
|
-
# Pry.start
|
|
12
|
-
|
|
13
|
-
require 'irb'
|
|
14
|
-
IRB.start
|
data/bin/setup
DELETED
data/cvss_suite.gemspec
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# CVSS-Suite, a Ruby gem to manage the CVSS vector
|
|
2
|
-
#
|
|
3
|
-
# This work is licensed under the terms of the MIT license.
|
|
4
|
-
# See the LICENSE.md file in the top-level directory.
|
|
5
|
-
|
|
6
|
-
# coding: utf-8
|
|
7
|
-
|
|
8
|
-
lib = File.expand_path('lib', __dir__)
|
|
9
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
10
|
-
require 'cvss_suite/version'
|
|
11
|
-
|
|
12
|
-
Gem::Specification.new do |spec|
|
|
13
|
-
spec.name = 'cvss-suite'
|
|
14
|
-
spec.version = CvssSuite::VERSION
|
|
15
|
-
spec.license = 'MIT'
|
|
16
|
-
spec.authors = ['0llirocks']
|
|
17
|
-
|
|
18
|
-
spec.summary = 'Ruby gem for processing cvss vectors.'
|
|
19
|
-
spec.description = 'This Ruby gem calculates the score based on the vector of the
|
|
20
|
-
Common Vulnerability Scoring System (https://www.first.org/cvss/specification-document)
|
|
21
|
-
in version 4.0, 3.1, 3.0 and 2.'
|
|
22
|
-
|
|
23
|
-
spec.homepage = 'https://cvss-suite.0lli.rocks'
|
|
24
|
-
|
|
25
|
-
spec.metadata = {
|
|
26
|
-
'bug_tracker_uri' => 'https://github.com/0llirocks/cvss-suite/issues',
|
|
27
|
-
'changelog_uri' => 'https://github.com/0llirocks/cvss-suite/releases',
|
|
28
|
-
'documentation_uri' => "https://www.rubydoc.info/gems/cvss-suite/#{CvssSuite::VERSION}",
|
|
29
|
-
'homepage_uri' => 'https://cvss-suite.0lli.rocks',
|
|
30
|
-
'source_code_uri' => 'https://github.com/0llirocks/cvss-suite'
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
spec.required_ruby_version = '>= 2.6.0'
|
|
34
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
35
|
-
spec.bindir = 'exe'
|
|
36
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
37
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
38
|
-
spec.require_paths = ['lib']
|
|
39
|
-
|
|
40
|
-
spec.add_dependency 'bigdecimal', '>= 3.1', '< 5'
|
|
41
|
-
|
|
42
|
-
spec.add_development_dependency 'bundler', '2.4.22'
|
|
43
|
-
spec.add_development_dependency 'csv', '~> 3.3'
|
|
44
|
-
spec.add_development_dependency 'rspec', '~> 3.4'
|
|
45
|
-
spec.add_development_dependency 'rspec-its', '~> 1.2'
|
|
46
|
-
spec.add_development_dependency 'rubocop', '1.50.2'
|
|
47
|
-
spec.add_development_dependency 'simplecov', '~> 0.18'
|
|
48
|
-
spec.add_development_dependency 'rake'
|
|
49
|
-
end
|