cvss-suite 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +21 -0
- data/.github/ISSUE_TEMPLATE/custom.md +7 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
- data/.gitignore +1 -0
- data/CHANGES.md +8 -0
- data/PULL_REQUEST_TEMPLATE.md +24 -0
- data/README.md +7 -1
- data/cvss_suite.gemspec +1 -0
- data/lib/cvss_suite/helpers/extensions.rb +2 -2
- data/lib/cvss_suite/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afb88b54004ef3913747597ae1168ed958f0c9b5
|
4
|
+
data.tar.gz: 8c94135d2769d08a6bcc3c08681d09e586bcd959
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd42ce66b758b6113fe4865efb111ee76b6b37c19cbbd33169447b92a143029edbc92222b32f1fd520a4737914b9de8609eb6b63dda957d4a41eedf038792454
|
7
|
+
data.tar.gz: 8d84caab47da1365b5fec94a93d5cb4fa1e0990e749121edf7d529687301d1e694c33bd8c16cef6faaa560f5835d86f86b52a895d5fb92e8dc57116fafe4c03e
|
@@ -0,0 +1,21 @@
|
|
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.
|
@@ -0,0 +1,17 @@
|
|
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/.gitignore
CHANGED
data/CHANGES.md
CHANGED
@@ -2,6 +2,14 @@
|
|
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.1.2] - 2018-12-28
|
6
|
+
|
7
|
+
### Fixes
|
8
|
+
Replaced Fixnum by Integer to improve compatibility with newer versions of Ruby.
|
9
|
+
|
10
|
+
### Improvements
|
11
|
+
Added example for CVSS v3 to README.
|
12
|
+
|
5
13
|
## [1.1.1] - 2018-10-18
|
6
14
|
|
7
15
|
### Fixes
|
@@ -0,0 +1,24 @@
|
|
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/README.md
CHANGED
@@ -29,6 +29,12 @@ Or install it yourself as:
|
|
29
29
|
```ruby
|
30
30
|
require 'cvss_suite'
|
31
31
|
|
32
|
+
cvss3 = CvssSuite.new('CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L/CR:L/IR:M/AR:H/MAV:N/MAC:H/MPR:N/MUI:R/MS:U/MC:N/MI:L/MA:H')
|
33
|
+
|
34
|
+
vector = cvss3.vector # 'CVSS:3.0/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L/CR:L/IR:M/AR:H/MAV:N/MAC:H/MPR:N/MUI:R/MS:U/MC:N/MI:L/MA:H"'
|
35
|
+
version = cvss3.version # 3
|
36
|
+
valid = cvss3.valid? # true
|
37
|
+
|
32
38
|
cvss = CvssSuite.new('AV:A/AC:M/Au:S/C:P/I:P/A:P/E:POC/RL:TF/RC:UC/CDP:L/TD:M/CR:M/IR:M/AR:M')
|
33
39
|
|
34
40
|
vector = cvss.vector # 'AV:A/AC:M/Au:S/C:P/I:P/A:P/E:POC/RL:TF/RC:UC/CDP:L/TD:M/CR:M/IR:M/AR:M'
|
@@ -81,7 +87,7 @@ Properties (Access Vector, Remediation Level, etc) do have a position attribute,
|
|
81
87
|
|
82
88
|
## Known Issues
|
83
89
|
|
84
|
-
Currently it is not possible to leave
|
90
|
+
Currently it is not possible to leave an attribute blank instead of ND/X. If you don't have a value for an attribute, please use ND/X instead.
|
85
91
|
|
86
92
|
Because the documentation isn't clear on how to calculate the score if Modified Scope (CVSS 3.0 Environmental) is not defined, Modified Scope has to have a valid value (S/U).
|
87
93
|
|
data/cvss_suite.gemspec
CHANGED
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
Besides calculating the Base, Temporal and Environmental Score, you are able to extract the selected option.}
|
26
26
|
spec.homepage = "https://siemens.github.io/cvss-suite/"
|
27
27
|
|
28
|
+
spec.required_ruby_version = '>= 2.0.0'
|
28
29
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
29
30
|
spec.bindir = 'exe'
|
30
31
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
@@ -21,7 +21,7 @@ class Float
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
|
-
class
|
24
|
+
class Integer
|
25
25
|
|
26
26
|
##
|
27
27
|
# Since CVSS 3 all float values are rounded up, therefore this method is used instead of the mathematically correct method round().
|
@@ -29,4 +29,4 @@ class Fixnum
|
|
29
29
|
def round_up(decimal_paces = 0)
|
30
30
|
(self * 10.0**decimal_paces).ceil / 10.0**decimal_paces
|
31
31
|
end
|
32
|
-
end
|
32
|
+
end
|
data/lib/cvss_suite/version.rb
CHANGED
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.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Hamboerger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -89,6 +89,9 @@ executables: []
|
|
89
89
|
extensions: []
|
90
90
|
extra_rdoc_files: []
|
91
91
|
files:
|
92
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
93
|
+
- ".github/ISSUE_TEMPLATE/custom.md"
|
94
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
92
95
|
- ".gitignore"
|
93
96
|
- ".rspec"
|
94
97
|
- ".rubocop.yml"
|
@@ -97,6 +100,7 @@ files:
|
|
97
100
|
- CODE_OF_CONDUCT.md
|
98
101
|
- Gemfile
|
99
102
|
- LICENSE.md
|
103
|
+
- PULL_REQUEST_TEMPLATE.md
|
100
104
|
- README.md
|
101
105
|
- bin/console
|
102
106
|
- bin/setup
|
@@ -130,7 +134,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
130
134
|
requirements:
|
131
135
|
- - ">="
|
132
136
|
- !ruby/object:Gem::Version
|
133
|
-
version:
|
137
|
+
version: 2.0.0
|
134
138
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
139
|
requirements:
|
136
140
|
- - ">="
|