Repository navigation
Add 3PartySHA2 signing for Newtonsoft.Json.dll and PowerArgs.dll - #678
Merged
embetten merged 1 commit intoJun 1, 2026
Merged
Conversation
These 3rd-party NuGet dependencies ship without Microsoft Authenticode signatures. Adding FilesToSign entries so MicroBuild signs them with 3PartySHA2 before VSIX packaging. Fixes VS signing scan violations in the mscredentialprovider payload. Bug: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2991357
Chuy Zarate (jesuszarate)
marked this pull request as ready for review
June 1, 2026 17:06
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
embetten
approved these changes
Jun 1, 2026
embetten
pushed a commit
that referenced
this pull request
Jun 2, 2026
…#681) Move 3rd-party FilesToSign items into a target to ensure files exist at signing time. ## Problem PR #678 added static FilesToSign items for PowerArgs.dll and Newtonsoft.Json.dll with 3PartySHA2. When @embetten ran a signed build, Newtonsoft.Json.dll showed a signature but PowerArgs.dll did not. The root cause: static FilesToSign items are evaluated before NuGet dependencies are copied to \. If the file doesn't exist yet, MicroBuild silently skips it. Newtonsoft.Json.dll appeared signed because it already carries a Microsoft signature from its NuGet package (Microsoft publishes it) -- MicroBuild didn't actually sign it either. ## Fix Move the 3rd-party FilesToSign items into an Add3rdPartyFilesToSign target with BeforeTargets=SignFiles and DependsOnTargets=Build. This ensures the DLLs are copied to \ before MicroBuild evaluates them for signing. Bug: [3007364](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/3007364)
embetten
added a commit
that referenced
this pull request
Jun 2, 2026
… into a target… (#682) … (#681) Move 3rd-party FilesToSign items into a target to ensure files exist at signing time. ## Problem PR #678 added static FilesToSign items for PowerArgs.dll and Newtonsoft.Json.dll with 3PartySHA2. When @embetten ran a signed build, Newtonsoft.Json.dll showed a signature but PowerArgs.dll did not. The root cause: static FilesToSign items are evaluated before NuGet dependencies are copied to \. If the file doesn't exist yet, MicroBuild silently skips it. Newtonsoft.Json.dll appeared signed because it already carries a Microsoft signature from its NuGet package (Microsoft publishes it) -- MicroBuild didn't actually sign it either. ## Fix Move the 3rd-party FilesToSign items into an Add3rdPartyFilesToSign target with BeforeTargets=SignFiles and DependsOnTargets=Build. This ensures the DLLs are copied to \ before MicroBuild evaluates them for signing. Bug: [3007364](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/3007364) Co-authored-by: Chuy Zarate <jezarat@microsoft.com>
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.
These 3rd-party NuGet dependencies ship without Microsoft Authenticode signatures. Adding FilesToSign entries so MicroBuild signs them with 3PartySHA2 before VSIX packaging.
Background: The ESRP Release team has informed us that VS is shipping unsigned and SHA1-only signed files that need to be addressed for compliance. The signing allow list (ExternalWhiteList.csv) will be zeroed out on June 8th.
The problem: The VS signing scan flags 2 files in the mscredentialprovider payload:
The fix: Added FilesToSign entries with 3PartySHA2 cert for both DLLs alongside the existing Microsoft400 entries in CredentialProvider.Microsoft.csproj.
VS tracking bug: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2991357