From fa23eb8ac65cd36c474b3d33de6524155ac61af6 Mon Sep 17 00:00:00 2001 From: Keshav Priyadarshi Date: Fri, 27 Nov 2026 18:34:24 +0530 Subject: [PATCH 1/2] fix: map osv crates.io packages to cargo PURLs resolves: https://github.com/aboutcode-org/vulnerablecode/issues/2538 Signed-off-by: Keshav Priyadarshi --- vulnerabilities/pipes/osv_v2.py | 1 + 1 file changed, 1 insertion(+) diff --git a/vulnerabilities/pipes/osv_v2.py b/vulnerabilities/pipes/osv_v2.py index 4b8ce47c7..265775895 100644 --- a/vulnerabilities/pipes/osv_v2.py +++ b/vulnerabilities/pipes/osv_v2.py @@ -49,6 +49,7 @@ "go": "golang", "hex": "hex", "cargo": "cargo", + "crates.io": "cargo", } OSV_TO_VCIO_SEVERITY_MAP = { From 27add96c3154a99780a4b5fb769d1e249d10002b Mon Sep 17 00:00:00 2001 From: Keshav Priyadarshi Date: Fri, 27 Nov 2026 18:35:54 +0530 Subject: [PATCH 2/2] test: add coverage for rust osv package Signed-off-by: Keshav Priyadarshi --- .../osv_test/github/github-expected-4.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/vulnerabilities/tests/test_data/osv_test/github/github-expected-4.json b/vulnerabilities/tests/test_data/osv_test/github/github-expected-4.json index bb5d4d5ab..10b708218 100644 --- a/vulnerabilities/tests/test_data/osv_test/github/github-expected-4.json +++ b/vulnerabilities/tests/test_data/osv_test/github/github-expected-4.json @@ -2,7 +2,22 @@ "advisory_id": "GHSA-wjxc-pjx9-4wvm", "aliases": [], "summary": "Nervos CKB Panic on malformed input\n### Impact\nCKB process will panic when received malformed p2p message because of snappy, which is used to compress network messages\n\n### References\nhttps://github.com/BurntSushi/rust-snappy/issues/29", - "affected_packages": [], + "affected_packages": [ + { + "package": { + "type": "cargo", + "namespace": "", + "name": "ckb", + "version": "", + "qualifiers": "", + "subpath": "" + }, + "affected_version_range": "vers:cargo/<=0.34.1", + "fixed_version_range": "vers:cargo/0.34.2", + "introduced_by_commit_patches": [], + "fixed_by_commit_patches": [] + } + ], "references": [ { "reference_id": "",