-
-
Notifications
You must be signed in to change notification settings - Fork 221
Modified github_advisory_sync.rb's new_data variable to add 'patched_versions' and related:'s url… #570
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
Conversation
@reedloden - FYI |
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.
Use nested Hashes instead of using \n
in Hash keys (I'm pretty sure YAML will escape those). Also the Hashes can probably be merged into one new_data.merge(...)
Hash.
lib/github_advisory_sync.rb
Outdated
file.write new_data.to_yaml | ||
file.write new_data.merge( | ||
{ "patched_versions" => vulnerabilities }, | ||
{ "related:\nurl:" => advisory["references"] } |
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 think that should be {"related" => {"url" => ...}}
.
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.
fixed
lib/github_advisory_sync.rb
Outdated
file.write new_data.to_yaml | ||
file.write new_data.merge( | ||
{ "patched_versions" => vulnerabilities }, | ||
{ "related:\nurl:" => advisory["references"] } |
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.
Also these two hashes could probably be combined.
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.
fixed
@jasnow FYI you seem to keep running |
Thanks for the clarification |
Modified github_advisory_sync.rb's new_data variable to add the "patched_versions" and "related:'"/"url:" sections.
The new (unreleased 1-line shell) post processor does the rest to get GHSA files ready for ruby-advisory-db repo. Long term this shell will be turned into Ruby code.