DependencyCheck: NVD API update is failing
Describe the bug
Running dependency-check --enableExperimental --nvdApiKey <my-nvd-api-key> --out ~/file-dependency-check.html --scan Package.resolved
on 9.0.5 fails during the records update
Version of dependency-check used The problem occurs using version 9.0.5 of the CLI
Log file gist
To Reproduce Steps to reproduce the behavior: Run the dependency check
Expected behavior The update should be successful, and the dependency check report should be generated.
Additional context This is running on a Circleci job, I’m downloading the latest version of the dependency check. After the update it started failing.
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Comments: 24 (9 by maintainers)
@jeremylong
I’ve been getting a multitude of errors on 9.0.7, from 403s (even though I’m running the command on my local machine with a fresh API Key) to database errors like
I’m downgrading back to 8.4.2 because 9.x.x has been nothing but trouble for me 👎
FWIW: You’re passing the key as a system property. So you might want to try
System.getProperty("nvdApiKey")
Have the same issue. API key works locally but on GitHub Actions the NVD update is (sometimes) interrupted by an exception:
Detailed maven log excerpt:
I would highly recommend reading https://jeremylong.github.io/DependencyCheck/data/index.html - specifically “The NVD Database” section. It would be ideal if you persisted the data directory between builds.
Weirdly my key works when I run the command in my local machine. I even purged the nvd file to check. The issue only happens when I run it on CircleCI with the API key. 🤦
If you are using an NVD API key and you get an immediate 403 - it is likely your API Key is not valid.
See https://github.com/jeremylong/Open-Vulnerability-Project/tree/main/vulnz#api-key-is-used-and-a-403-or-404-error-occurs
I request for new nvd api key and now it works