OSV parser drops all crates.io affected entries because the ecosystem mapping uses cargo
維護者通常 1 天內回覆
評估
研究方向
從 vulnerabilities/importers/osv.py 開始,檢查 PURL_TYPE_BY_OSV_ECOSYSTEM 以及 issue 中描述的 OSV 生態系統查找邏輯。參考 serde 範例,為一則 crates.io 安全公告新增測試涵蓋。完成標準是 crates.io 項目會產生包含修復版本的 cargo 套件 URL,且現有的 cargo 鍵仍可正常運作。
由索引模型根據 Issue 內容生成。
描述
I found that every crates.io advisory is silently dropped by the OSV parser.
In vulnerabilities/importers/osv.py, the PURL_TYPE_BY_OSV_ECOSYSTEM mapping is keyed by "cargo", but the ecosystem name in OSV data is "crates.io". The lookup lowercases the ecosystem string and finds no match for crates.io, so no package URL is built for the entry and the affected entry is skipped entirely.
I ran the parser on OSV advisories for serde and got:
F) ecosystem "crates.io", fixed version 1.0.0
-> [] (dropped)
G) ecosystem "Cargo" (not the real OSV ecosystem name), fixed version 1.0.0
-> pkg:cargo/serde with fixed 1.0.0 (works)
So the downstream path works end to end; only the ecosystem name in the mapping is wrong. This also means the cargo support that GithubOSVImporter.supported_ecosystems advertises never actually happens for real OSV data.
The fix I have in mind is to add a "crates.io": "cargo" entry to PURL_TYPE_BY_OSV_ECOSYSTEM, keeping the existing "cargo" key. Happy to raise a PR if this approach sounds right.
- 主要語言
- Python
- 星號
- 716
- 分支
- 347
- 平均合併
- 13 小時 47 分鐘
- 30 天內合併 PR
- 8
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
aboutcode-org/vulnerablecode 的其他 Issue
-
Docker Compose setup fails on wait-for-it host web:8000 and missing runtime .env可能已有人在做 @Anurag-S1ngh 於 6 天前認領。 未關閉
難度 2/5 半天 新手友好度 77/100
aboutcode-org/vulnerablecode#2477 · 1 則留言 ·
維護者通常 1 天內回覆
-
OVAL parser corrupts version bounds when the epoch is 10, 20 or the version contains "0:"可能已有人在做 @Ashutosh-Panda2004 於 4 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
aboutcode-org/vulnerablecode#2474 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 86/100
aboutcode-org/vulnerablecode#2426 ·
維護者通常 1 天內回覆
-
Get NuGet package versions from federated PURL version data in https://github.com/aboutcode-data/可能重新可做 @Anshi321 於 25 天前認領,目前沒有進行中的 PR。 未關閉bug data-quality
難度 2/5 1-3 小時 新手友好度 72/100
aboutcode-org/vulnerablecode#2418 · 4 則留言 ·
維護者通常 1 天內回覆
-
We do not collect the affected range for Gitlab advisories可能已有人在做 @akashrajeev 於 12 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 70/100
aboutcode-org/vulnerablecode#2412 · 1 則留言 ·
維護者通常 1 天內回覆
查看 aboutcode-org/vulnerablecode 的全部 Issue
相似的 Issue
-
ai_p2 bug comp-datalake
難度 2/5 1-3 小時 新手友好度 85/100
ClickHouse/ClickHouse#128306 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
[bug] openlit: LLM spans from openlit 1.37+ get no OpenInference attributes, and cache and reasoning token counts are dropped可能已有人在做 @sohom-cs 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 74/100
Arize-ai/openinference#4199 · 1 個 reaction ·
維護者通常 2 天內回覆
-
難度 1/5 1 小時以內 新手友好度 82/100
MichaelYcJo/SpecSeal#1192 ·