Skip to content

Commit b8fde2b

Browse files
committed
Update glibc importer to use AdvisoryDataV2
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
1 parent 54a1b67 commit b8fde2b

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

vulnerabilities/pipelines/v2_importers/glibc_importer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from univers.version_range import GenericVersionRange
1717
from univers.versions import InvalidVersion
1818

19-
from vulnerabilities.importer import AdvisoryData
19+
from vulnerabilities.importer import AdvisoryDataV2
2020
from vulnerabilities.importer import AffectedPackageV2
2121
from vulnerabilities.importer import PackageCommitPatchData
2222
from vulnerabilities.importer import logger
@@ -34,6 +34,8 @@ class GlibcImporterPipeline(VulnerableCodeBaseImporterPipelineV2):
3434
license_url = "https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=LICENSES"
3535
repo_url = "git+https://sourceware.org/git/glibc.git"
3636

37+
precedence = 200
38+
3739
@classmethod
3840
def steps(cls):
3941
return (
@@ -142,7 +144,7 @@ def collect_advisories(self):
142144
)
143145
)
144146

145-
yield AdvisoryData(
147+
yield AdvisoryDataV2(
146148
advisory_id=advisory_id,
147149
aliases=[cve_id] if cve_id else [],
148150
summary=build_description(summary, description),

vulnerabilities/tests/test_data/glibc/advisories/GLIBC-SA-2023-0001-expected.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
]
4242
}
4343
],
44-
"references_v2": [],
44+
"references": [],
4545
"patches": [],
4646
"severities": [],
4747
"date_published": "2023-02-02T00:00:00+00:00",

vulnerabilities/tests/test_data/glibc/advisories/GLIBC-SA-2025-0004-expected.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
]
4848
}
4949
],
50-
"references_v2": [],
50+
"references": [],
5151
"patches": [],
5252
"severities": [],
5353
"date_published": "2025-06-05T00:00:00+00:00",

vulnerabilities/tests/test_data/glibc/advisories/GLIBC-SA-2026-0002-expected.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
]
3636
}
3737
],
38-
"references_v2": [],
38+
"references": [],
3939
"patches": [],
4040
"severities": [],
4141
"date_published": "2026-01-15T00:00:00+00:00",

0 commit comments

Comments
 (0)