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.
Undo unrelated changes to keep this PR diff clean
Moved to google#2219 to get merged sooner.
- Loading branch information
1 parent
d75f4aa
commit 8b6e6d0
Showing
2 changed files
with
8 additions
and
24 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,24 +1,10 @@ | ||
# Converting NVD CVEs for open source software to OSV | ||
# Proof-of-concept code to leverage vulnfeeds for reasoning about C/C++ sources | ||
|
||
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: | ||
This can be invoked as: | ||
|
||
```shell | ||
go run cmd/nvd-cve-osv/main.go \ | ||
--nvd_json cve_jsons/nvdcve-1.1-2022.json \ | ||
``` | ||
mkdir -p /tmp/nvd2osv | ||
gcloud storage cp "gs://cve-osv-conversion/cpe_repos/cpe_product_to_repo.json" "/tmp" | ||
|
||
curl --output /tmp/CVE-2024-3094.json https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2024-3094 | ||
git clone --recurse-submodules https://github.com/google/osv.dev | ||
cd osv.dev/vulnfeeds | ||
go run cmd/nvd-cve-osv/main.go \ | ||
--cpe_repos "/tmp/cpe_product_to_repo.json" \ | ||
--nvd_json "/tmp/CVE-2024-3094.json" \ | ||
--out_dir "/tmp/nvd2osv" | ||
``` | ||
Use `cmd/download-cves/main.go` for downloading the NVD JSON files |