Adapt rust importer to new advisory format - #281
Conversation
|
Fixes #280 |
pombredanne
left a comment
There was a problem hiding this comment.
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. |
| from urllib.request import urlopen | ||
|
|
||
| import pytoml as toml | ||
| import toml |
pombredanne
left a comment
There was a problem hiding this comment.
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.