Repository navigation
fix: collect affected range for GitLab advisories with tricky Maven ranges - #2473
Open
akashrajeev wants to merge 1 commit into
Open
akashrajeev wants to merge 1 commit into
akashrajeev wants to merge 1 commit into
Conversation
…anges Some Maven affected_range values in the GitLab advisories fail to parse (single point ranges like [1.81.0,1.81.0], or segments out of version order), so the affected range gets dropped entirely. Parse the range segment by segment as a fallback and combine the constraints, so these advisories keep their affected range. Reference: aboutcode-org#2412 Signed-off-by: Akash Rajeev <akashrajeev.313@gmail.com>
This branch has not been deployed
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.
Fixes #2412
Some Maven affected_range values in the GitLab advisories don't parse in one pass (single point ranges like
[1.81.0,1.81.0], or segments listed out of order), so the importer drops the affected range entirely and the advisory ends up with nothing.Now the importer falls back to parsing the range segment by segment and combining the pieces, so these advisories keep their affected range. Single point ranges are treated as that exact version. Added tests covering the bcprov case from the issue plus a plain single point range.