Skip to content

Instantly share code, notes, and snippets.

@ceving
Last active March 13, 2024 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ceving/7a2b57a9c368ecd3f4088fc7b2fd581e to your computer and use it in GitHub Desktop.
Save ceving/7a2b57a9c368ecd3f4088fc7b2fd581e to your computer and use it in GitHub Desktop.
Find all Go CVEs

Find all Go CVEs

Suppose you have cloned https://github.com/CVEProject/cvelistV5

Find all CVE-IDs for which the assignerShortName of the cveMetadata is "Go":

find cves -type f -name 'CVE-*.json' -exec cat {} + |
  jq -r '.cveMetadata | select(.assignerShortName == "Go") | .cveId'

Same with title:

find cves -type f -name 'CVE-*.json' -exec cat {} + |
  jq -r 'select(.cveMetadata.assignerShortName == "Go") | "\(.cveMetadata.cveId) \(.containers.cna.title)"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment