-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Adds a test to ensure that patched_versions has an open ended upper l… #302
Conversation
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.
I like the idea, but the spec needs improvement. Also I think you messed up that first patched_versions
change.
spec/gem_example.rb
Outdated
|
||
# If a gem is unpatched this test makes no sense | ||
unless patched_versions.none? | ||
expect(versions.any? { |version| version.match(/^>=|^>/)}).to be_truthy |
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.
There may be advisories where multiple version families were patched. Thus the last version family would probably be >= ...
. Example:
patched_versions:
- "~> 1.0.1"
- "~> 1.1.5"
- "~> 1.2.9"
- ">= 1.3.0"
I think a better test would be to ensure that the last patched_versions
element is always open-ended.
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 suggestion, I ended up having to sort the versions that the conditions applied to in order to make this work because the order is not consistent...
gems/fog-dragonfly/OSVDB-90647.yml
Outdated
@@ -14,3 +14,5 @@ description: | | |||
cvss_v2: 7.5 | |||
unaffected_versions: | |||
- "< 0.7.0" | |||
patched_versions: | |||
- ">= 0.9.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.
According to the original advisory, 0.9.14 contains the patch. https://groups.google.com/forum/?fromgroups=#!topic/dragonfly-users/3c3WIU3VQTo
Hopefully this should do the trick PTAL @postmodern |
47f4629
to
e6bdeb0
Compare
Bump ... |
LGTM (and would have caught the Rubocop issue above) @postmodern I believe this addresses your concerns. |
…imit
Fixes #285