-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates for CVSS v3.1 #23
Conversation
9847592
to
ed9b4fe
Compare
@@ -7,12 +7,15 @@ matrix: | |||
include: | |||
- name: "Python 2.6" | |||
python: 2.6 | |||
dist: trusty # required for legacy Python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, that really is reaching back into the past! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Modified Scope Unchanged 6.42 x [ISCModified] | ||
If Modified Scope Changed 7.52 x [ISCModified-0.029] - 3.25 x [ISCModified-0.02]^15 | ||
If Modified Scope Changed 7.52 x [ISCModified-0.029] - 3.25 x [ISCModified-0.02]^15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a little embarrassing but when I saw this comment last week I did not immediately understand that it was the formula being used. Also it may be better as a code comment than as part of the docstring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. However, it is everywhere in the code and for some reason I thought it is a good idea back when I wrote the first version.
@skontar These changes look great and the tests are very thorough. To see the changes in the test data I needed to first sort Finally it was difficult to run the tests locally. If that is never the intention you may want to add that to the README. Thank you for supporting 3.1 so quickly! |
else: # Modified scope has always value, if not defined then matches Scope | ||
self.modified_isc = (D('7.52') * (self.modified_isc_base - D('0.029')) - | ||
D('3.25') * (self.modified_isc_base * D('0.9731') - D('0.02')) | ||
** D('13')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the only differences in the formulas are the constants being used, you could keep one formula and parameterize the differences in a look-up table? What you have is very clear. Maybe something to consider if there is a 3.2...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I will leave it for now but as you said, something to keep on mind if 3.2 ever comes.
@bac I do not understand your comment about sorting the Also, can you explain the difficulties with running tests? I am usually just running |
|
|
I retract my statement. I'm not sure what I thought I saw initially. Sorry for the noise. |
More readable code for hint exceptions. Co-Authored-By: Danil Ineev <saigono@users.noreply.github.com>
No description provided.