-
Notifications
You must be signed in to change notification settings - Fork 201
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
Add OSS-Index DataSource #829
Add OSS-Index DataSource #829
Conversation
ac83f14
to
576330b
Compare
477921c
to
bcc3fe0
Compare
bcc3fe0
to
e639b5e
Compare
vulntotal/datasources/oss_index.py
Outdated
|
||
|
||
def parse_advisory(component) -> Iterable[VendorData]: | ||
response = component[0] |
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.
please assert if length of component is 1 before accesing it
vulntotal/datasources/oss_index.py
Outdated
|
||
def parse_advisory(component) -> Iterable[VendorData]: | ||
response = component[0] | ||
if response["vulnerabilities"]: |
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 more pythonic way to get objects from dictionary for example
if response["vulnerabilities"]: | |
if response.get("vulnerabilities"): |
Add doctsrings for all the functions and also add doctests/ unit tests for functions which have not been tested at all |
Closes #820