Sign inSign up

pluggedout/cve-fetcher

By pluggedout

•Updated almost 2 years ago

A Docker-based tool designed to help people search, filter, and analyze CVE data.

Image
Security
1

974

pluggedout/cve-fetcher repository overview

⁠Prepare

To prepare register for an API key from NIST at https://nvd.nist.gov/developers/api-key-requested

Your new API key should soon be in your inbox.

Then when you have it edit ~/.bashrc (on Linux) or ~/.bash_profile (on WSL) and add export NVD_API_KEY=<your key here>

Then run the command source ~/.bashrc (on Linux) or source ~/.bash_profile (on WSL)

You are now ready to query the NVD CVE database

⁠Pull and run
docker pull pluggedout/cve-fetcher:latest
docker run --rm -e NVD_API_KEY cve-fetcher:latest "topic" [days]

Note: The examples below use jq, a Linux tool, to filter and format json data.

An example run could be:

docker run --rm -e NVD_API_KEY cve-fetcher:latest "Wordpress" 30 | jq 

That query looks up new Wordpress CVE's for the last 30 days.

If you want only critical CVE's in Wordpress the last 7 days, and just a summary (--brief), run this:

 docker run --rm -e NVD_API_KEY cve-fetcher:latest "Wordpress" 7 --brief | jq '.[] | select(.severity == "CRITICAL")'

If you want to only look up XSS vulnerabilities in Wordpress the last 30 days use this command (by filtering on CWE-79)

docker run --rm -e NVD_API_KEY cve-fetcher:latest "Wordpress" 30 --brief | jq '.[] | select(.cweIds[] == "CWE-79")'
⁠Troubleshooting
jq: error (at <stdin>:1): Cannot index string with string "cweIds"

If you get an error like this, try deleting everything after jq. You probably have a 404 from the NVD API. Try decreasing how many days ago you search. For instance to below 100.

The same error happens for other reasons too, like a missing or wrong API key.

Remember, if you remove the --brief parameter you gotta change the jq filtering too.

Tag summary

Content type

Image

Digest

sha256:0282cfec3…

Size

32.7 MB

Last updated

almost 2 years ago

docker pull pluggedout/cve-fetcher