vulnerablecode icon indicating copy to clipboard operation
vulnerablecode copied to clipboard

Gentoo Importer failing due to invalid version

Open jarek-o opened this issue 1 month ago • 3 comments

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

jarek-o avatar Nov 03 '25 09:11 jarek-o

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.

Arka-Saha avatar Nov 19 '25 16:11 Arka-Saha

Assigned! @Arka-Saha

TG1999 avatar Nov 19 '25 16:11 TG1999

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

Arka-Saha avatar Dec 11 '25 16:12 Arka-Saha