Repository navigation
Add license scan diff investigation skill - #9454
Merged
mthalman merged 4 commits intoSep 18, 2026
Merged
Conversation
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new analyzer script has a couple of correctness/operability issues (silent duplicate path overwrites and potentially unbounded output size) that should be fixed before merging.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR adds a repository-scoped skill and accompanying tooling to make source-build license scan baseline/exclusion diffs deterministic to analyze, by introducing shared models/policy utilities and a file-based analyzer app that correlates baseline deltas with raw ScanCode evidence.
Changes:
- Add a new
.github/skills/license-scan-diff-investigationskill describing a repeatable investigation workflow and adotnet run --fileanalyzer script. - Introduce
test/LicenseScanUtilitieswith shared ScanCode/baseline JSON models and policy helpers (expression splitting, exclusion parsing, glob/path normalization). - Update
LicenseScanTeststo use the shared baseline model and expression-splitting helper.
File summaries
| File | Description |
|---|---|
| test/Microsoft.DotNet.SourceBuild.Tests/Microsoft.DotNet.SourceBuild.Tests.csproj | References the new shared LicenseScanUtilities project from source-build tests. |
| test/Microsoft.DotNet.SourceBuild.Tests/LicenseScanTests.cs | Switches to shared ScanCode/baseline contracts and shared expression splitting logic. |
| test/LicenseScanUtilities/LicenseScanUtilities.csproj | New shared utilities project (TFM-aligned with bundled test framework) and globbing dependency. |
| test/LicenseScanUtilities/ScanCodeModels.cs | Adds shared JSON models for baseline (LicenseScanDocument) and raw ScanCode results (ScanCodeDocument). |
| test/LicenseScanUtilities/LicenseScanPolicy.cs | Adds shared parsing/matching helpers for expressions, exclusions, and path normalization. |
| .github/skills/license-scan-diff-investigation/SKILL.md | New repository-scoped skill documentation defining the investigation workflow and safety rules. |
| .github/skills/license-scan-diff-investigation/scripts/LicenseScanAnalyzer.cs | New file-based analyzer app for comparing baseline/exclusion/allowed-license deltas and attaching ScanCode evidence. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <[email protected]>
lbussell
reviewed
Sep 17, 2026
Co-authored-by: Copilot App <[email protected]>
lbussell
approved these changes
Sep 18, 2026
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.
Problem
Source-build license baseline updates require manual investigation to determine whether each ScanCode finding represents an allowed free and open-source license, a false positive, non-applicable metadata, an intentional baseline entry, or content that must be remediated.
The generated baseline records what ScanCode detected but does not make that classification. Investigations also need to correlate baseline changes with raw CI evidence, apply the same filtering semantics as the source-build test, and verify that proposed allowed-license or exclusion changes fully resolve each finding.
Description
Add a repository-scoped skill for investigating source-build license scan diffs and generated baseline-update pull requests.
Add a shared
LicenseScanUtilitiesproject so the source-build test and analyzer use the same ScanCode contracts, expression decomposition, exclusion parsing, path normalization, and glob-matching behavior. KeepTestUtilitiesindependent.