From 27c72f84943d28448a867f803c699867fcb864d3 Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Thu, 16 Nov 2023 06:21:14 -0500 Subject: [PATCH] docs: improve documentation (#84) resolves #78 --- vulnz/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/vulnz/README.md b/vulnz/README.md index f5b3d4fa..11afb41c 100644 --- a/vulnz/README.md +++ b/vulnz/README.md @@ -42,6 +42,24 @@ the below command you will end up with a directory with: - ... - `nvdcve-2023.json` +### API Key is used and a 404 error occurs + +If an API Key is used and you receive a 404 error: + +``` +ERROR +io.github.jeremylong.openvulnerability.client.nvd.NvdApiException: NVD Returned Status Code: 404 +``` + +There is a good chance that the API Key is set incorrectly or is invalid. To check if the API Key works +the following `curl` command should return JSON: + +``` +curl -H "Accept: application/json" -H "apiKey: ########-####-####-####-############" -v https://services.nvd.nist.gov/rest/json/cves/2.0\?cpeName\=cpe:2.3:o:microsoft:windows_10:1607:\*:\*:\*:\*:\*:\*:\* +``` + +If no JSON is returned and you see a 404 error the API Key is invalid and you should request a new one. + ### Out-of-Memory Errors Create the local cache may result in an out-of-memory error. To resolve the