aboutcode-org / vulnerablecode

A free and open vulnerabilities database and the packages they impact. And the tools to aggregate and correlate these vulnerabilities. Sponsored by NLnet https://nlnet.nl/project/vulnerabilitydatabase/ for https://www.aboutcode.org/ Chat at https://gitter.im/aboutcode-org/vulnerablecode Docs at https://vulnerablecode.readthedocs.org/
https://public.vulnerablecode.io
Apache License 2.0
543 stars 201 forks source link

Data Import from NVD data Script Added #1610

Closed Rishi-source closed 1 month ago

Rishi-source commented 1 month ago

Summary

This pull request enhances the vulnerability data import by allowing data to be imported from a json data stored in the local directory NVD_Data. It also considers robust error handling to manage duplicate package entries and missing data. Additionally, the code supports storing a simplified "plain" package URL without qualifiers or subpaths.

Related Issues

1437

Testing Instructions

Run the import process with the following command:

python manage.py import_data

Test importing data from a local folder i.e NVD_Data.

Check that duplicate package entries are gracefully handled and skipped. Review the logs to ensure they accurately reflect each step of the process, including any errors or skipped files. Verify that plain package URLs (without qualifiers and subpaths) are being correctly stored in the database.