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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67b9524624c103f1410747cc5601fc6c51bdaeb3
4
- data.tar.gz: 92eb12a5d7266cdfcef91ee3d6090d59d493b8c8
3
+ metadata.gz: afb88b54004ef3913747597ae1168ed958f0c9b5
4
+ data.tar.gz: 8c94135d2769d08a6bcc3c08681d09e586bcd959
5
5
  SHA512:
6
- metadata.gz: c575ffb21ee0c1742911641921e3d661bbe421e77cb073080281b98bc2133fe8aaab4ac5ab521455a9253794a91a58d71ebdeddaa7ce70127e718856f0cfa0b3
7
- data.tar.gz: af23d1944795b0eb5eb4172ad742199f9f8aefc22cf17563c61e22ac6883848aa38d7564896ed84d2360e4becec28ca9abe84c71cb714ac933e511e2e302c392
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,7 @@
1
+ ---
2
+ name: Custom issue template
3
+ about: Describe this issue template's purpose here.
4
+
5
+ ---
6
+
7
+
@@ -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
@@ -10,3 +10,4 @@
10
10
  /tmp/
11
11
  .idea/
12
12
  /*.gem
13
+ .ruby-version
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 a attribute blank instead of ND/X. If you don't have a value for a attribute, please use ND/X instead.
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
 
@@ -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 Fixnum
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
@@ -9,5 +9,5 @@
9
9
  # See the LICENSE.md file in the top-level directory.
10
10
 
11
11
  module CvssSuite
12
- VERSION = "1.1.1"
12
+ VERSION = "1.1.2"
13
13
  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: 1.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-10-18 00:00:00.000000000 Z
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: '0'
137
+ version: 2.0.0
134
138
  required_rubygems_version: !ruby/object:Gem::Requirement
135
139
  requirements:
136
140
  - - ">="