forked from google/osv.dev
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into document_quality_bar
- Loading branch information
Showing
2 changed files
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,27 @@ | ||
# Proof-of-concept code to leverage vulnfeeds for reasoning about C/C++ sources | ||
# Converting NVD CVEs for open source software to OSV | ||
|
||
This can be invoked as: | ||
Further context at [Introducing broad C/C++ vulnerability management support](https://osv.dev/blog/posts/introducing-broad-c-c++-support/) | ||
|
||
See [run_cve_to_osv_generation.sh](https://github.com/google/osv.dev/blob/master/vulnfeeds/cmd/nvd-cve-osv/run_cve_to_osv_generation.sh) for how this is invoked in Production. | ||
|
||
To see it in action on a single CVE: | ||
|
||
```shell | ||
go run cmd/nvd-cve-osv/main.go \ | ||
--nvd_json cve_jsons/nvdcve-1.1-2022.json \ | ||
``` | ||
CVE=CVE-2024-3094 | ||
git clone --recurse-submodules https://github.com/google/osv.dev | ||
cd osv.dev/vulnfeeds | ||
mkdir /tmp/nvd /tmp/nvd2osv | ||
(cd test_data && ./download_specific_cves $CVE) | ||
mv test_data/nvdcve-2.0/${CVE}.json /tmp/nvd | ||
gcloud storage cp "gs://osv-test-cve-osv-conversion/cpe_repos/cpe_product_to_repo.json" "/tmp" | ||
go run cmd/nvd-cve-osv/main.go \ | ||
--cpe_repos "/tmp/cpe_product_to_repo.json" \ | ||
--nvd_json "/tmp/nvd/${CVE}.json" \ | ||
--out_dir "/tmp/nvd2osv" | ||
Use `cmd/download-cves/main.go` for downloading the NVD JSON files | ||
cat /tmp/nvd2osv/*/*/${CVE}.json |