Repository navigation
fix(scan): include a source path on license findings - #345
Merged
Merged
Conversation
Name the manifest or LICENSE/NOTICE/COPYING file on vg scan license findings in JSON and SARIF, and report unparseable SPDX text at that path instead of dropping it. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: vibgrate-team <vibgrate-team@users.noreply.github.com>
# Conflicts: # DOCS.md
vibgrate-team
marked this pull request as ready for review
October 5, 2026 05:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vg scanJSON and SARIF now name a stable source file for a declared license whenever the scan has one.package.jsonlicenseorlicensesfield is recorded at that manifest (projects[].license.path).LICENSE/LICENCE/COPYING/NOTICEfile (fixed name order, including.mdand.txt) is the evidence path.vibgrate/license-parse-failedwarning at that path (locationanddetails.pathin JSON; SARIFartifactLocation.uriandproperties.path). The same rule the scan already uses for dependency license strings, vialicenseParseDiagnostic. An explicitNOASSERTIONis not a failure.details.path.Related issues
Closes #213
Checklist
pnpm testpassespnpm lintis cleanpnpm typecheckis cleangraph.json/ report output (content-hashed IDs, stable sorts; no time, randomness, or filesystem-order dependence)git commit -s, DCO)Notes for reviewers
pnpm test(4982 passed),pnpm lint(existing unused-var warnings only, none in this change), andpnpm typecheckall passed.test/license-findings.test.tscovers a fixturepkg/LICENSEwhose body is not an SPDX expression. It assertspkg/LICENSEonprojects[].license.path, the JSON finding (location,details.path), and the SARIFartifactLocation.uri/properties.path, and that a later line of the file is absent from the artifact. A second call on the same tree is byte-identical. This repository's ownpackage.json(Apache-2.0),LICENSE, andNOTICEproduce no finding.