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: surface actionable errors when license IDs fail SPDX-style parse (no silent drop) #233
If a package license string cannot be parsed into an SPDX-style identifier, silently omitting it from vg scan / report / SBOM paths hides data quality problems. Users should see an actionable message (what failed + what to do), consistent with local-first, no-secrets error style.
What to do
Reproduce with a fixture package whose license field is malformed / non-SPDX.
Ensure machine-readable and human output either include a structured warning/finding or a clear stderr note — never a quiet omission with no trace.
Keep determinism: same fixture → same warning text/code every run.
Never log registry tokens or file contents that look like secrets.
Acceptance
Malformed license is visible in output or as an explicit warning/finding
Message is actionable (failed parse + suggested next step)
parseLicenseExpression in src/core-open/licenses/spdx-expression.ts is intentionally tolerant: malformed input returns whatever tokens it can and never an error. normalizeLicense (src/core-open/licenses/normalize.ts) then finishes at matchStatus: 'unknown' / NOASSERTION. Scan, report, and SBOM paths that print only spdxId and skip unknown are the silent drop.
Those files are vendored by scripts/vendor-core-open.mjs. Change the core-open source and re-vendor. Do not hand-edit the copies under src/core-open/.
Contract:
When the raw string is non-empty and status is unknown, or a constituent id inside an expression does not resolve, emit one stable diagnostic code. Include a truncated raw license string and the manifest-relative path. No file bodies and no tokens.
matchStatus: 'fuzzy' is not this failure. Do not warn on fuzzy matches as parse errors.
Same fixture must produce the same code and text. Cover it next to the existing license tests.
Activity
vibgrate-team commentedon Oct 3, 2026
parseLicenseExpressioninsrc/core-open/licenses/spdx-expression.tsis intentionally tolerant: malformed input returns whatever tokens it can and never an error.normalizeLicense(src/core-open/licenses/normalize.ts) then finishes atmatchStatus: 'unknown'/NOASSERTION. Scan, report, and SBOM paths that print onlyspdxIdand skipunknownare the silent drop.Those files are vendored by
scripts/vendor-core-open.mjs. Change the core-open source and re-vendor. Do not hand-edit the copies undersrc/core-open/.Contract:
unknown, or a constituent id inside an expression does not resolve, emit one stable diagnostic code. Include a truncated raw license string and the manifest-relative path. No file bodies and no tokens.matchStatus: 'fuzzy'is not this failure. Do not warn on fuzzy matches as parse errors.