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
- 平均合并
- 12 小时 15 分钟
- 30 天内合并 PR
- 9
环境准备
- 提供 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 于 5 天前认领。 未关闭
难度 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:"可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 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 于 24 天前认领,目前没有进行中的 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 于 11 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
aboutcode-org/vulnerablecode#2412 · 1 条评论 ·
维护者通常 1 天内回复
查看 aboutcode-org/vulnerablecode 的全部 Issue
相似的 Issue
-
factory
难度 2/5 1-3 小时 新手友好度 78/100
Arize-ai/phoenix#17420 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
FireDynamics/LEDSmokeAnalysis#176 ·
维护者通常 1 天内回复
-
PC
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
dependencies
难度 2/5 1-3 小时 新手友好度 68/100
dlt-contrib/dlt-filesystem#51 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复