`gitlab_importer_v2` pipeline failing due to malformed YAML file
Maintainers usually reply within 5 days
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
- Domain
- backend, data-engineering
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
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aboutcode-org/vulnerablecode
-
Pipeline run pages return 500 for a schedule whose pipeline is not registeredPossibly taken @sanchit955 claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
aboutcode-org/vulnerablecode#2505 ·
Maintainers usually reply within 5 days
-
Affected-by-advisories v2 page returns 500 for a purl with no matching packagePossibly taken @sanchit955 claimed this 8 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
aboutcode-org/vulnerablecode#2501 ·
Maintainers usually reply within 5 days
-
OSV v3 parser shares introduced/fixed commit patches across affected packagesPossibly taken @Celestial-0 claimed this 21 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
aboutcode-org/vulnerablecode#2489 ·
Maintainers usually reply within 5 days
-
OSV parser drops all crates.io affected entries because the ecosystem mapping uses cargoPossibly taken @Ashutosh-Panda2004 claimed this 27 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
aboutcode-org/vulnerablecode#2485 · 1 comment ·
Maintainers usually reply within 5 days
-
Docker Compose setup fails on wait-for-it host web:8000 and missing runtime .envPossibly taken @Anurag-S1ngh claimed this 31 days ago. Open
Difficulty 2/5 Half a day Newbie friendliness 77/100
aboutcode-org/vulnerablecode#2477 · 1 comment ·
Maintainers usually reply within 5 days
All issues in aboutcode-org/vulnerablecode
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
intuitem/ciso-assistant-community#5380 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
confluentinc/cp-ansible#2767 ·
Maintainers usually reply within 3 days
-
bug docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 2 days
-
metaskirando
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day