You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: multi-line pubspec.yaml dependencies create bogus packages named version, url, path or ref #583
parsePubspecYaml in src/core-open/scanners/dart-scanner.ts only reads one-line entries (name: constraint). For the map form it skips the package line (nothing after the colon) and then matches the nested keys as if they were packages:
dependencies:
http:
version: ^1.2.0shared:
path: ../sharedanalyzer_plugin:
git:
url: https://github.com/example/plugin.gitref: main
This yields rows named version, path, url and ref, and the real http, shared and analyzer_plugin dependencies are missing from vg scan and vg sbom export.
What to do
Track indentation: a two-space key with no value opens a dependency entry, and deeper keys belong to it.
Use a nested version: as the constraint; record path: and git: dependencies with their source rather than a version (or skip them deliberately, but never emit the nested key as a package).
Keep the existing sdk: flutter skip, and add unit tests.
Acceptance
The example above yields http (^1.2.0), and no packages named version, path, url, ref or git.
path: / git: dependencies are handled deliberately and documented in a test.
Confirmed: parsePubspecYaml in src/core-open/scanners/dart-scanner.ts only understands name: constraint lines, so the nested version:, path:, url: and ref: keys of the map form are picked up as package names.
The fix is mostly about indentation: record the indent of the line that opens a dependency (a key with no value at the section's child level), treat deeper lines as belonging to it, and only read version: from them. path: and git: dependencies have no registry version, so emitting them with their source (or deliberately skipping them) is fine as long as a test documents which.
Activity
vibgrate-team commentedon Nov 4, 2026
Confirmed:
parsePubspecYamlinsrc/core-open/scanners/dart-scanner.tsonly understandsname: constraintlines, so the nestedversion:,path:,url:andref:keys of the map form are picked up as package names.The fix is mostly about indentation: record the indent of the line that opens a dependency (a key with no value at the section's child level), treat deeper lines as belonging to it, and only read
version:from them.path:andgit:dependencies have no registry version, so emitting them with their source (or deliberately skipping them) is fine as long as a test documents which.fix(dart): read map-form pubspec dependencies (vibgrate#597)