Repository navigation
fix(api): allow Alpine queries without a release number - #2946
Merged
Merged
Conversation
hogo6002
requested review from
andrewpollock,
another-rex,
michaelkedar and
oliverchang
December 3, 2024 00:17
Contributor
|
This change aside, I think there's a important need to up-level the API documentation, none of the nuances around expectations and behaviour of purl parameters are really discussed in any sort of detail. |
andrewpollock
approved these changes
Dec 3, 2024
michaelkedar
approved these changes
Dec 3, 2024
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.
The OSV spec requires Alpine packages to have a
:v<RELEASE-NUMBER>suffix. Currently, our API has inconsistencies regarding Alpine queries:pkg:apk/alpine/postgresql14?arch=source), it returns all matching vulnerabilities across all releases.Also we recently switched our PURL query from PURL string matching to package/ecosystem matching (#2900). This change causes all Alpine-related PURL API queries to fail because PURL string doesn't contain any release info and the PURL spec doesn't define how to include release numbers.
Since OSV-generated Alpine PURLs (e.g.
pkg:apk/alpine/postgresql14?arch=source) don't contain release numbers, we should allow Alpine queries without a release number for consistency. This change would return all matching vulnerabilities across different releases when no release number is specified.