Skip to content

Add importer for safetydb - #153

Merged
haikoschol merged 3 commits into
aboutcode-org:developfrom
sbs2001:develop
Mar 14, 2020
Merged

haikoschol merged 3 commits into
aboutcode-org:developfrom
sbs2001:develop

Conversation

@sbs2001

@sbs2001 sbs2001 commented Mar 3, 2020

Copy link
Copy Markdown
Collaborator

Signed-off-by: Shivam Sandbhor shivam.sandbhor@gmail.com

This data is imported from https://github.com/pyupio/safety-db .

Fixes #91

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
@pombredanne

Copy link
Copy Markdown
Member

@Jwomers ping!
Do you have any intention to have an open source license with the NC for pyup data? https://github.com/pyupio/safety-db/blob/b873cceee96c04c4e9df93d17087592e94290482/LICENSE.txt
@sbs2001 thank ++ for this. This is useful to have but we cannot aggregate the data if this is precludes commercial use (whatever non commercial means is vague enough) . We can still provide the tool, but we will NOT run it until this is resolved.

Comment thread vulnerabilities/scraper/safety_db.py Outdated
Comment thread vulnerabilities/scraper/safety_db.py Outdated
Comment thread vulnerabilities/scraper/safety_db.py Outdated
if version in version_range:
affected_versions.add(version)
unaffected_versions = all_package_versions - affected_versions
if cve_id not in cves:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If two packages are affected by the same CVE, doesn't this check cause the second one to be skipped entirely? And didn't this issue come up before somewhere? It seems familiar...

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct, I remember vaguely, that the code was violating constraints which was temporarily fixed by removing the summary. We need some concrete way to deal with this. Some pointers to duplicate(not exactly) data https://github.com/pyupio/safety-db/blob/b873cceee96c04c4e9df93d17087592e94290482/data/insecure_full.json#L247 and https://github.com/pyupio/safety-db/blob/b873cceee96c04c4e9df93d17087592e94290482/data/insecure_full.json#L256

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge it as is and refine it later.

sbs2001 added 2 commits March 9, 2020 08:13
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
if version in version_range:
affected_versions.add(version)
unaffected_versions = all_package_versions - affected_versions
if cve_id not in cves:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge it as is and refine it later.

@haikoschol
haikoschol merged commit 39df9ea into aboutcode-org:develop Mar 14, 2020
@sbs2001 sbs2001 mentioned this pull request Mar 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collect Pyup safety DB

3 participants