-
-
Notifications
You must be signed in to change notification settings - Fork 264
Adapt rust importer to new advisory format #281
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
|
Fixes #280 |
pombredanne
left a comment
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.
Thanks!
See some comments inline. Also try to avoid the big test files. Testting the opening of a zip file is rather trivial. One the other hand having a few test markdown as text files would make sense.
+515 KB vulnerabilities/tests/test_data/advisory-db.zip
+365 KB (170%) vulnerabilities/tests/test_data/rust-advisory-db.zip
|
@pombredanne about zip files : Those are compressed git repositories. I tried trimming these but I was getting mysterious bugs and just gave up on that. We have |
|
re:
IMHO we should be able to create smaller zip with fewer files. How did you do this?
Then may be renaming these to have a clearer name would help. |
vulnerabilities/importers/rust.py
Outdated
| from urllib.request import urlopen | ||
|
|
||
| import pytoml as toml | ||
| import toml |
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.
nit: sort the imports
pombredanne
left a comment
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 made a small suggestion for your consideration. LGTM otherwise!
Thank you
70147d1 to
c707179
Compare
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
c707179 to
3e7ac65
Compare
Rust advisory db has moved on from using plain toml to using markdown + toml 'front matter' .
This PR enables the current rust importer to import data from the new format.