`gitlab_importer_v2` pipeline failing due to malformed YAML file

オープン 初心者向け
#2,523 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 5 日以内に返信

@Gowri213 がすでに取り組んでいます。

2026年11月24日 から。

  • #2525 @Gowri213 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python, yaml

調査の方向性

vulnerabilities/pipelines/v2_importers/gitlab_importer.py から始めます。ここでは parse_gitlab_advisory が 208 行目付近で saneyaml.load を呼び出しています。リンクされた advisory ファイルで再現して、複数ドキュメントの YAML エラーを確認します。次に、vulnerabilities/pipelines/__init__.py から collect_advisories がどのように反復されるかを追い、1 つの不正なファイルをバッチ全体を中止せずにスキップまたはログ記録できるようにします。完了とは、importer が不正な advisory を越えて処理を続け、それを報告し、回帰テストがスキップ経路をカバーしている状態です。

索引モデルが issue の本文から書いたものです。

説明

bug Pipeline: Failure Priority: high

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時間
マージ済み PR(30日)
3

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aboutcode-org/vulnerablecode のほかの issue

aboutcode-org/vulnerablecode の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。