Skip to content

Add NVD importer - #243

Merged
pombredanne merged 3 commits into
aboutcode-org:developfrom
sbs2001:nvd_importer
Sep 24, 2020
Merged

Add NVD importer#243
pombredanne merged 3 commits into
aboutcode-org:developfrom
sbs2001:nvd_importer

Conversation

@sbs2001

@sbs2001 sbs2001 commented Aug 10, 2020

Copy link
Copy Markdown
Collaborator

This branch is based on #227.

Finally an importer for NVD.

Fixes #71

Comment thread vulnerabilities/importers/nvd.py

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!
See my reply inline

Comment thread vulnerabilities/importers/nvd.py Outdated
Comment thread vulnerabilities/importers/nvd.py
Comment thread vulnerabilities/importers/nvd.py
Comment thread vulnerabilities/importers/nvd.py Outdated
ref_url = reference["url"]

# Skip references which exceed db constraints
if ref_id and len(ref_id) > 50:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ouch ... if you have a reference that crashes your schema, then your schema needs to be updated. Do not skip the data!

@pombredanne pombredanne Aug 11, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This would mean a model change IMHO

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.

Let me first find the long ref id first.

I found some bugs after adding the length filter. Things may have changed

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.

The extraction of reference ids from NVD is complicated, it contains lots of noise, I've skipped collecting the reference ids for now .

@sbs2001
sbs2001 force-pushed the nvd_importer branch 2 times, most recently from eb24a34 to a0e75ba Compare August 11, 2020 12:05
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>

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Thanks!

@pombredanne
pombredanne merged commit a66050b into aboutcode-org:develop Sep 24, 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 CVE from NVD

2 participants