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

Switch all ecosystem version queries to range match #3063

Open
10 of 21 tasks
hogo6002 opened this issue Jan 20, 2025 · 0 comments
Open
10 of 21 tasks

Switch all ecosystem version queries to range match #3063

hogo6002 opened this issue Jan 20, 2025 · 0 comments

Comments

@hogo6002
Copy link
Contributor

hogo6002 commented Jan 20, 2025

We currently have three ways of handling API version queries:

  • For semver versions: We first match against the affected version range (using normalization) and then apply generic version matching (affected versions match) to refine the results.
  • For non-semver versions with comparison support: We pull all related packages from db, check their affected versions, and then compare them with the affected version ranges.
  • For non-semver versions without comparison support: We only pull packages that contain the currently queried version within their affected versions (using affected_fuzz).

Both semver version query and range comparison query methods match against affected versions and affected ranges, and providing the best coverage. We should use the range comparison method for all non-semver ecosystems, as it offers accurate results (also it doesn't slow down much):

  • Alpine
  • AlmaLinux
  • Bioconductor
  • CRAN
  • Debian
  • Chainguard
  • GHC
  • Hackage
  • Maven
  • NuGet
  • openSUSE
  • Packagist
  • Pub
  • PyPI
  • Red Hat
  • Rocky Linux
  • RubyGems
  • SUSE
  • Ubuntu
  • Wolfi

We could also potentially apply the version comparison method to the semver ecosystem to unify our query methods and simplify our code logic. This needs more testing to assess its impact on performance and accuracy.

  • semver version (unsure for this one)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant