Skip to content
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

Merged

Conversation

keshav-space
Copy link
Member

  • add OSS-Index DataSource
  • add tests for OSS-Index DataSource

Closes #820

@keshav-space keshav-space linked an issue Aug 5, 2022 that may be closed by this pull request
@keshav-space keshav-space self-assigned this Aug 5, 2022
@keshav-space keshav-space added the VulnTotal Tool for cross-validating vulnerability label Aug 5, 2022
@keshav-space keshav-space marked this pull request as draft August 25, 2022 20:05
@keshav-space keshav-space marked this pull request as ready for review August 26, 2022 19:09


def parse_advisory(component) -> Iterable[VendorData]:
response = component[0]
Copy link
Contributor

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


def parse_advisory(component) -> Iterable[VendorData]:
response = component[0]
if response["vulnerabilities"]:
Copy link
Contributor

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

Suggested change
if response["vulnerabilities"]:
if response.get("vulnerabilities"):

@TG1999
Copy link
Contributor

TG1999 commented Sep 5, 2022

Add doctsrings for all the functions and also add doctests/ unit tests for functions which have not been tested at all

@keshav-space keshav-space mentioned this pull request Oct 12, 2022
9 tasks
@pombredanne pombredanne merged commit b18b2ed into aboutcode-org:vulntotal Nov 19, 2022
@keshav-space keshav-space deleted the oss_index_datasource branch January 10, 2023 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VulnTotal Tool for cross-validating vulnerability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add OSS Index DataSource
3 participants