Skip to content

Gentoo Importer failing due to invalid version #2015

Closed

Description

@jarek-o

Hi team,

I have noticed Gentoo importer fails due to some problem with invalid version:

./manage.py import vulnerabilities.importers.gentoo.GentooImporter
Importing data using vulnerabilities.importers.gentoo.GentooImporter
Traceback (most recent call last):
  File "/app/vulnerabilities/management/commands/import.py", line 70, in import_data
    ImportRunner(importer).run()
  File "/app/vulnerabilities/import_runner.py", line 62, in run
    count = self.process_advisories(advisory_datas=advisory_datas, importer_name=importer_name)
  File "/app/vulnerabilities/import_runner.py", line 105, in process_advisories
    for data in advisory_datas:
  File "/app/vulnerabilities/importers/gentoo.py", line 41, in advisory_data
    yield from self.process_file(file_path)
  File "/app/vulnerabilities/importers/gentoo.py", line 69, in process_file
    affected_packages = list(self.affected_and_safe_purls(child))
  File "/app/vulnerabilities/importers/gentoo.py", line 108, in affected_and_safe_purls
    VersionConstraint(version=GentooVersion(version), comparator="=").invert()
  File "<attrs generated init univers.versions.Version>", line 7, in _init_
    self._attrs_post_init_()
  File "/usr/local/lib/python3.9/site-packages/univers/versions.py", line 87, in _attrs_post_init_
    raise InvalidVersion(f"{self.string!r} is not a valid {self._class_!r}")
univers.versions.InvalidVersion: '3.24.48:3' is not a valid <class 'univers.versions.GentooVersion'>
Failed to run importer vulnerabilities.importers.gentoo.GentooImporter. Continuing...
CommandError: 1 failed!: vulnerabilities.importers.gentoo.GentooImporter

Activity

  1. Arka-Saha commented on Nov 19, 2025

    @Arka-Saha

    Hey there, I am very familiar with programming in Python and the tech stack used here. I would love to work and solve this issue.
    if you can assign this to me, I would love to start working on it asap.

  2. TG1999 commented on Nov 19, 2025

    @TG1999
    Contributor

    Assigned! @Arka-Saha

  3. Arka-Saha commented on Dec 11, 2025

    @Arka-Saha

    @ziadhany @TG1999 Hey there, can you please review my PR and let me know if it needs any changes or improvements.

  4. ziadhany commented on Feb 19, 2026

    @ziadhany
    Collaborator

    This issue has been fixed in:

    gentoo importer V1 logs:

    Importing data using vulnerabilities.importers.gentoo.GentooImporter
    Invalid safe_version 3.24.48:3 - error: '3.24.48:3' is not a valid <class 'univers.versions.GentooVersion'>
    Invalid safe_version 6.9.3:6 - error: '6.9.3:6' is not a valid <class 'univers.versions.GentooVersion'>
    Successfully imported data using vulnerabilities.importers.gentoo.GentooImporter
    

    @jarek-o , Thank you for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions