{"id":20937212,"url":"https://github.com/josephp91/libnvd","last_synced_at":"2025-12-27T18:38:08.816Z","repository":{"id":76582805,"uuid":"122645209","full_name":"JosephP91/libnvd","owner":"JosephP91","description":"C++ library to locally store, update and index the National Vulnerabilities Database.","archived":false,"fork":false,"pushed_at":"2018-04-28T10:26:19.000Z","size":141,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-19T20:18:08.832Z","etag":null,"topics":["cplusplus","cplusplus-11","cplusplus-14","cpp","cpp11","libbson","libmongoc","libmongodb","mongo-cxx-driver","mongodb","national-vulnerability-database"],"latest_commit_sha":null,"homepage":"https://josephp91.github.io/libnvd/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JosephP91.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-23T16:26:19.000Z","updated_at":"2018-04-28T10:26:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"6153269d-ec3e-4081-80f3-5115ac6e6805","html_url":"https://github.com/JosephP91/libnvd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosephP91%2Flibnvd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosephP91%2Flibnvd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosephP91%2Flibnvd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosephP91%2Flibnvd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JosephP91","download_url":"https://codeload.github.com/JosephP91/libnvd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243330326,"owners_count":20274039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cplusplus","cplusplus-11","cplusplus-14","cpp","cpp11","libbson","libmongoc","libmongodb","mongo-cxx-driver","mongodb","national-vulnerability-database"],"created_at":"2024-11-18T22:34:03.003Z","updated_at":"2025-12-27T18:38:08.774Z","avatar_url":"https://github.com/JosephP91.png","language":"C++","readme":"# nvd-import\nnvd-import is a command line utility written in C++ using libmongoc, libbson , mongo C++ driver (mongocxx driver) and a \nJSON parser, to store, index and update in a MongoDB database the National Vulnerabilities Database locally.\n\n# Dependencies\nThe software depends on ```libmongoc```, ```libbson``` and ```mongo-cxx-driver```. These dependencies will be automatically installed\nexecuting the installation script, located under the script directory:\n\n```bash\ncd script\n./install.sh\n```\n\nIf you need to customize the install script, you can easly edit it.\n\n# Install\nYou can compile the project and install the library doing this:\n\n```bash\ncd build\ncmake ..\nmake\nsudo make install\n```\n\n# Compile\nNow that you have all the dependencies installed, you can compile the test sources typing the following commands. The library uses some facilities of C++14 standard, so be sure your compiler supports it.\n\n```bash\ncd script\n./compile.sh\n```\n\n# The configuration file\n\nYou can use the configuration file, config.json, to change the database and the collection name to use. Plus, you can add more mongodb indexes to speed up the query. If you want to know which fields you can index, take a look at the files content listed here: https://nvd.nist.gov/vuln/data-feeds#JSON_FEED\n\n# Importing the national vulnerability database\nIn oreder to create a database with the national vulnerabilities, you have to download the JSON files from \nhttps://nvd.nist.gov/vuln/data-feeds#JSON_FEED. You will find a JSON file for every year until now, plus two\nfiles which contains the modified and recent vulerabilities, that you can use to sync your local database with \nthe new discovered vulnerabilities. You can use the download script placed under the script directory. It will\ndownload every JSON feed on the page in the ```feed``` directory.\n\n```bash\n# Download all the JSON files\ncd nvd-import/script\n./download\n```\n\nI recommend you to separate the modified and recent JSON feed, from the yearly feed files.\nYou can place these files wherever you want, for example:\n\n```bash\n# Store yearly JSON feed here.\ncd nvd-import\nmkdir -p ./feeds/insert\n\n# Store modified and recent files here.\nmkdir -p ./feeds/update\n```\n\nThen you can start to import those files using the script nvd_import.sh:\n\n```bash\ncd script\n./import.sh path_to_yearly_json_feed\n```\n\nWait until the all the files are processed. Then, you can process the recent and modified files:\n\n```bash\ncd script\n./update.sh path_to_recent_and_modified_files\n```\n\nDone! :)\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosephp91%2Flibnvd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosephp91%2Flibnvd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosephp91%2Flibnvd/lists"}