Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

advisory discover: cache NVD API query results #404

Open
luhring opened this issue Sep 24, 2023 · 0 comments
Open

advisory discover: cache NVD API query results #404

luhring opened this issue Sep 24, 2023 · 0 comments
Labels
enhancement New feature or request needs-triage applied to all new customer/user issues. Removed after triage occurs.

Comments

@luhring
Copy link
Contributor

luhring commented Sep 24, 2023

Querying NVD's API is expensive. Even in the best case, where the user has an API key, we can only make requests at ~1.7 reqs/sec. And today Wolfi has ~1400 package definitions according to wolfictl ls.

NVD's response data for a given request (CPE) is unlikely to change frequently. We should consider caching API responses locally for some duration of time (e.g. 24 hours). This would greatly speed up the total runtime of the wolfictl advisory discover command.

And meanwhile, even with cached data, we would still be able to:

  • Detect new matches using cached data, e.g. when a new version stream is added
  • Detect new matches using uncached data for newly added distro packages
@luhring luhring added enhancement New feature or request needs-triage applied to all new customer/user issues. Removed after triage occurs. labels Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-triage applied to all new customer/user issues. Removed after triage occurs.
Projects
None yet
Development

No branches or pull requests

2 participants