Skip to content

Conversation

@ziadhany
Copy link
Collaborator

@ziadhany ziadhany commented Dec 30, 2025

@ziadhany ziadhany changed the title Add initial migration to Gentoo importer v2 Migrate Gentoo importer to advisory V2 Dec 30, 2025
@ziadhany ziadhany marked this pull request as ready for review January 1, 2026 13:58
@ziadhany
Copy link
Collaborator Author

ziadhany commented Jan 1, 2026

gentoo importer V2 logs:

Importing data using gentoo_importer_v2
INFO 2026-01-20 14:00:11.529312 UTC Pipeline [GentooImporterPipeline] starting
INFO 2026-01-20 14:00:11.529444 UTC Step [clone] starting
INFO 2026-01-20 14:00:11.529498 UTC Cloning `git+https://anongit.gentoo.org/git/data/glsa.git`
INFO 2026-01-20 14:00:28.124417 UTC Step [clone] completed in 17 seconds
INFO 2026-01-20 14:00:28.124532 UTC Step [collect_and_store_advisories] starting
INFO 2026-01-20 14:00:28.152235 UTC Collecting 3,809 advisories
INFO 2026-01-20 14:00:32.160683 UTC Progress: 10% (381/3809) ETA: 36 seconds
INFO 2026-01-20 14:00:36.249911 UTC Progress: 20% (762/3809) ETA: 32 seconds
INFO 2026-01-20 14:00:40.561674 UTC Progress: 30% (1143/3809) ETA: 29 seconds
InvalidVersion constraints version: 3.24.48:3 error:'3.24.48:3' is not a valid <class 'univers.versions.GentooVersion'>
InvalidVersion constraints version: 3.24.48:3 error:'3.24.48:3' is not a valid <class 'univers.versions.GentooVersion'>
INFO 2026-01-20 14:00:44.720233 UTC Progress: 40% (1524/3809) ETA: 25 seconds
INFO 2026-01-20 14:00:49.021022 UTC Progress: 50% (1905/3809) ETA: 21 seconds
INFO 2026-01-20 14:00:53.391492 UTC Progress: 60% (2286/3809) ETA: 17 seconds
InvalidVersion constraints version: 6.9.3:6 error:'6.9.3:6' is not a valid <class 'univers.versions.GentooVersion'>
InvalidVersion constraints version: 6.9.3:6 error:'6.9.3:6' is not a valid <class 'univers.versions.GentooVersion'>
INFO 2026-01-20 14:00:57.680025 UTC Progress: 70% (2667/3809) ETA: 13 seconds
INFO 2026-01-20 14:01:02.014558 UTC Progress: 80% (3048/3809) ETA: 8 seconds
INFO 2026-01-20 14:01:05.521231 UTC Progress: 90% (3429/3809) ETA: 4 seconds
INFO 2026-01-20 14:01:09.619623 UTC Progress: 100% (3809/3809)
INFO 2026-01-20 14:01:09.635518 UTC Successfully collected 3,809 advisories
INFO 2026-01-20 14:01:09.635625 UTC Step [collect_and_store_advisories] completed in 42 seconds
INFO 2026-01-20 14:01:09.635678 UTC Step [clean_downloads] starting
INFO 2026-01-20 14:01:09.635724 UTC Removing cloned repository
INFO 2026-01-20 14:01:09.684045 UTC Step [clean_downloads] completed in 0 seconds
INFO 2026-01-20 14:01:09.684140 UTC Pipeline completed in 58 seconds
from vulnerabilities.models import AdvisoryV2
from django.db.models import Count
duplicates = (
    AdvisoryV2.objects
    .values('avid')
    .annotate(count=Count('id'))
    .filter(count__gt=1)
)
len(duplicates)
Out[2]: 0
AdvisoryV2.objects.count()
Out[3]: 3809

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

@ziadhany
Copy link
Collaborator Author

ziadhany commented Jan 1, 2026

Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Update the Gentoo get_safe_and_affected_versions function in advisory v2

Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.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.

1 participant