Skip to content

Commit b9e2ae1

Browse files
committed
Support Ubuntu ecosystem in osv parser
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent 5dc8332 commit b9e2ae1

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

vulnerabilities/pipes/osv_v2.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,17 @@ def get_affected_purl(affected_pkg, raw_id):
318318
else:
319319
ecosys = package.get("ecosystem")
320320
name = package.get("name")
321+
namespace = ""
322+
321323
if ecosys and name:
322324
ecosys = ecosys.lower()
323325
purl_type = PURL_TYPE_BY_OSV_ECOSYSTEM.get(ecosys)
326+
if ecosys.startswith("ubuntu"):
327+
purl_type = "deb"
328+
namespace = "ubuntu"
329+
324330
if not purl_type:
325331
return
326-
namespace = ""
327332
if purl_type == "maven":
328333
namespace, _, name = name.partition(":")
329334

0 commit comments

Comments
 (0)