Skip to content

fix: collect affected range for GitLab advisories with tricky Maven ranges - #2473

Open
akashrajeev wants to merge 1 commit into
aboutcode-org:mainfrom
akashrajeev:gitlab-maven-affected-range
Open

akashrajeev wants to merge 1 commit into
aboutcode-org:mainfrom
akashrajeev:gitlab-maven-affected-range

Conversation

@akashrajeev

Copy link
Copy Markdown

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.

…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

No deployments
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

Successfully merging this pull request may close these issues.

We do not collect the affected range for Gitlab advisories

1 participant