`gitlab_importer_v2` pipeline failing due to malformed YAML file

Open Beginner friendly
#2,523 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 5 days

@Gowri213 is already working on this.

Since Nov 24, 2026.

  • #2525 by @Gowri213 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python, yaml

Research direction

Start in vulnerabilities/pipelines/v2_importers/gitlab_importer.py, where parse_gitlab_advisory calls saneyaml.load around line 208; reproduce with the linked advisory file to see the multi-document YAML error. Then follow how collect_advisories is iterated from vulnerabilities/pipelines/__init__.py so one bad file can be skipped or logged without aborting the batch. Done means the importer continues past the malformed advisory, reports it, and a regression test covers the skip path.

Written by the indexing model from the issue text.

Description

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.
Dominant language
Python
Stars
719
Forks
359
Avg merge
1d 23h
Merged PRs (30d)
3

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aboutcode-org/vulnerablecode

All issues in aboutcode-org/vulnerablecode

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.