Add --base-url to seed the NVD cache from a published base#415
Open
anatoliy-balakirev wants to merge 1 commit into
Open
Add --base-url to seed the NVD cache from a published base#415anatoliy-balakirev wants to merge 1 commit into
anatoliy-balakirev wants to merge 1 commit into
Conversation
91b5bc5 to
9f917b2
Compare
Building the cache with `cve --cache` crawls the full NVD history through the rate-limited API, which can take hours and fail on 503 or HTTP/2 reset errors. This adds an optional `--base-url`: when the local cache is empty, it downloads a published cache (`cache.properties` plus `nvdcve-*.json.gz`/`.meta` files), verifies each feed gzip against the sha256 in its sibling `.meta`, and lets the existing API update fill in only the recent delta. Existing caches are left untouched. A scheduled GitHub Actions workflow publishes that base as a rolling release: it seeds from the previous release, refreshes from the NVD API, and re-uploads only files that changed, so a fresh `--base-url` seed can avoid a multi-hour full crawl. Closes jeremylong#414
9f917b2 to
be7a8ba
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Building the cache with
cve --cachecrawls the full NVD history through the rate-limited API, which can take hours and fail on 503 or HTTP/2 reset errors.This adds an optional
--base-url: when the local cache is empty, it downloads a published cache (cache.propertiesplusnvdcve-*.json.gz/.metafiles), verifies each feed gzip against the sha256 in its sibling.meta, and lets the existing API update fill in only the recent delta. Existing caches are left untouched.A scheduled GitHub Actions workflow publishes that base as a rolling release: it seeds from the previous release, refreshes from the NVD API, and re-uploads only files that changed, so a fresh
--base-urlseed can avoid a multi-hour full crawl.Closes #414