Skip to content

Conversation

@Adityakk9031
Copy link
Contributor

Problem
The
GentooImporter
was failing with univers.versions.InvalidVersion errors when encountering package versions containing slots (e.g., '3.24.48:3'). This happened because univers.versions.GentooVersion does not support the slot syntax in the version string.

Fixes #1921

Solution
Updated
vulnerabilities/importers/gentoo.py
to strip the slot suffix (starting with :) from version strings before passing them to GentooVersion. This ensures that only the version number is used for comparison, avoiding the validation error.

Changes
Modified GentooImporter.affected_and_safe_purls to split version strings on : and take the first part.
Verification

Signed-off-by: Aditya kumar singh <143548997+Adityakk9031@users.noreply.github.com>
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.

GentooImporter failing with InvalidVersion error

1 participant