Skip to content

Add 3PartySHA2 signing for Newtonsoft.Json.dll and PowerArgs.dll - #678

Merged
embetten merged 1 commit into
microsoft:masterfrom
jesuszarate:dev/jezarat/sign-3rdparty-deps
Jun 1, 2026
Merged

embetten merged 1 commit into
microsoft:masterfrom
jesuszarate:dev/jezarat/sign-3rdparty-deps

Conversation

@jesuszarate

Copy link
Copy Markdown
Member

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:

  • Newtonsoft.Json.dll (v13.0.2) - signed by publisher with DigiCert, needs Microsoft 3PartySHA2
  • PowerArgs.dll (v3.6.0) - completely unsigned, needs 3PartySHA2

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

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
@jesuszarate
Chuy Zarate (jesuszarate) marked this pull request as ready for review June 1, 2026 17:06
@embetten

embetten commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@embetten
embetten merged commit c8e253e into microsoft:master Jun 1, 2026
55 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants