Add JSON metadata for scanner reports - #28
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Extends schema 2 JSON scanner reports with provenance and file-level metadata while preserving existing output modes and exit codes.
Changes:
- Adds scanner name and binary version.
- Adds SHA-256 hashes and legal-file roles.
- Marks expressions contributed by root legal or README files.
Non-blocking nit: cmd/licenses/scan.go computes legal-file roles before filtering non-reportable files, causing avoidable per-file overhead.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
cmd/licenses/scan.go |
Implements report metadata and classification logic. |
cmd/licenses/scan_test.go |
Tests metadata, hashes, roles, and expression classification. |
cmd/licenses/main.go |
Passes CLI version into scans. |
cmd/licenses/main_test.go |
Verifies JSON metadata and output fields. |
cmd/licenses/licensee_comparison_test.go |
Updates scanner invocation. |
cmd/licenses/benchmark_test.go |
Updates benchmark invocations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
andrew
force-pushed
the
issues-18-21-report-fields
branch
from
August 21, 2026 08:35
47abe3b to
e7ac0a9
Compare
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.
Adds scanner name and binary version to JSON reports. Reported files now include source-byte SHA-256 hashes and legal-file roles, while expressions record whether root legal or README files contributed them.
Schema 2 remains additive. Existing output modes and exit codes are unchanged.
Closes #18
Closes #19
Closes #20
Closes #21