cisagov / cyhy-core

Core code for Cyber Hygiene (CyHy)
Other
7 stars 9 forks source link

Add KEV importer #62

Closed dav3r closed 2 years ago

dav3r commented 2 years ago

๐Ÿ—ฃ Description

This PR defines a new collection to store KEV (Known Exploited Vulnerability) data and adds a new cyhy-kevsync utility that can import a JSON file containing the KEV data into the CyHy database.

Since I was here, I alphabetized our collection names in a couple of places.

๐Ÿ’ญ Motivation and context

Resolves https://github.com/cisagov/cyhy-system/issues/39 and resolves https://github.com/cisagov/cyhy-system/issues/40.

๐Ÿงช Testing

I verified that cyhy-kevsync works as expected when run in the default mode (fetch JSON file from a well-known URL) and in the mode where a local JSON file is provided.

I also confirmed that previously-imported KEVs were correctly deleted from the database if they were not included in a more-recent JSON file that was imported.

โœ… Pre-approval checklist