`gitlab_importer_v2` pipeline failing due to malformed YAML file
维护者通常 5 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- python, yaml
调研方向
从 vulnerabilities/pipelines/v2_importers/gitlab_importer.py 开始,parse_gitlab_advisory 在第 208 行附近调用 saneyaml.load;用链接的 advisory 文件复现,以查看多文档 YAML 错误。然后跟踪 collect_advisories 如何从 vulnerabilities/pipelines/__init__.py 中被迭代,以便可以跳过或记录一个坏文件而不中止整个批次。完成意味着 importer 会越过格式错误的 advisory 继续执行、报告它,并且回归测试覆盖跳过路径。
由索引模型根据 Issue 内容生成。
描述
GitLab importer pipeline is failing due to malformed YAML file https://gitlab.com/gitlab-org/advisories-community/-/blob/66bba584cc78745661635d1e3bc19a6d2edf1144/npm/reasonix/CVE-2026-102437.yml
expected a single document in the stream
in "/tmp/tmpqd_cy1jx/checkout/npm/reasonix/CVE-2026-102437.yml", line 2, column 1
but found another document
in "/tmp/tmpqd_cy1jx/checkout/npm/reasonix/CVE-2026-102437.yml", line 30, column 1
Traceback:
File "/app/vulnerabilities/pipelines/__init__.py", line 111, in execute
step(self)
File "/app/vulnerabilities/pipelines/__init__.py", line 336, in collect_and_store_advisories
for advisory in progress.iter(self.collect_advisories()):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aboutcode/pipeline/__init__.py", line 314, in iter
for item in iterator:
^^^^^^^^
File "/app/vulnerabilities/pipelines/v2_importers/gitlab_importer.py", line 100, in collect_advisories
advisory = parse_gitlab_advisory(
^^^^^^^^^^^^^^^^^^^^^^
File "/app/vulnerabilities/pipelines/v2_importers/gitlab_importer.py", line 208, in parse_gitlab_advisory
gitlab_advisory = saneyaml.load(f)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/saneyaml.py", line 62, in load
return yaml.load(s, Loader=loader)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/yaml/__init__.py", line 81, in load
return loader.get_single_data()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/yaml/constructor.py", line 49, in get_single_data
node = self.get_single_node()
^^^^^^^^^^^^^^^^^^^^^^
File "yaml/_yaml.pyx", line 681, in yaml._yaml.CParser.get_single_node
- The entire pipeline should not fail due to a single malformed file.
- The malformed advisory in question should be reported upstream.
- 主要语言
- Python
- 星标
- 719
- 派生
- 359
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 3
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aboutcode-org/vulnerablecode 的其他 Issue
-
Pipeline run pages return 500 for a schedule whose pipeline is not registered可能已有人在做 @sanchit955 于 7 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
aboutcode-org/vulnerablecode#2505 ·
维护者通常 5 天内回复
-
Affected-by-advisories v2 page returns 500 for a purl with no matching package可能已有人在做 @sanchit955 于 8 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
aboutcode-org/vulnerablecode#2501 ·
维护者通常 5 天内回复
-
OSV v3 parser shares introduced/fixed commit patches across affected packages可能已有人在做 @Celestial-0 于 21 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
aboutcode-org/vulnerablecode#2489 ·
维护者通常 5 天内回复
-
OSV parser drops all crates.io affected entries because the ecosystem mapping uses cargo可能已有人在做 @Ashutosh-Panda2004 于 27 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
aboutcode-org/vulnerablecode#2485 · 1 条评论 ·
维护者通常 5 天内回复
-
Docker Compose setup fails on wait-for-it host web:8000 and missing runtime .env可能已有人在做 @Anurag-S1ngh 于 31 天前认领。 未关闭
难度 2/5 半天 新手友好度 77/100
aboutcode-org/vulnerablecode#2477 · 1 条评论 ·
维护者通常 5 天内回复
查看 aboutcode-org/vulnerablecode 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
intuitem/ciso-assistant-community#5380 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
confluentinc/cp-ansible#2767 ·
维护者通常 3 天内回复
-
bug docs
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 2 天内回复
-
metaskirando
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复