Repository navigation
Fix SignCheck signing-validation issues (cabinet.dll on non-Windows, DAC exclusions, verbose build output, MSB4181, source-build strong-name) - #7580
Merged
akoeplinger merged 4 commits intoJul 8, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates SignCheck’s ExeVerifier to avoid attempting WiX Burn bundle inner-container (CAB) extraction on non-Windows platforms, preventing DllNotFoundException failures caused by Microsoft.Deployment.Compression.Cab P/Invoking Windows-only cabinet.dll.
Changes:
- Add a
RuntimeInformation.IsOSPlatform(OSPlatform.Windows)gate around.wixburnBurn bundle payload extraction. - Add inline commentary explaining why inner-container verification is skipped on non-Windows while still verifying the outer executable’s Authenticode signature.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Burn bundle payloads are packed in CAB containers that can only be extracted via the native cabinet.dll available on Windows. When signing validation runs on a Linux/macOS agent, ExeVerifier threw a DllNotFoundException trying to load cabinet.dll while scanning a Windows Burn bundle .exe. Guard the inner-container extraction to Windows. The outer executable's Authenticode signature is still verified, and the payloads are verified by the Windows leg of signing validation. Co-authored-by: Copilot <[email protected]>
akoeplinger
force-pushed
the
akoeplinger/signcheck-burn-windows-guard
branch
from
July 7, 2026 18:40
9ea8be2 to
c95b1df
Compare
…ion.proj The dynamically-appended mscordaccore.dll/mscordbi.dll exclusions used a raw ';;' in the SignCheckExclusionItem Include value. MSBuild treats ';' as an item separator, so each entry was written to the generated exclusions file as two separate lines (the file name and the comment) instead of the required 'filename;;comment' single-line format, breaking those DAC exclusions when DAC signing is disabled. Escape the separators as '%3B' so each entry stays intact. Co-authored-by: Copilot <[email protected]>
ellahathaway
approved these changes
Jul 7, 2026
ViktorHofer
approved these changes
Jul 7, 2026
…d log Since signing validation moved to the in-proc SignCheckTask, the SignCheck ConsoleLogger writes every processed file to stdout, which MSBuild echoes into the AzDO build log (thousands of "Signed: True" lines). Pre-migration, SignCheck ran as a subprocess with its output redirected to signcheck.log, so only the unsigned/DO-NOT-SIGN files were surfaced to the build log, with their AuthentiCode/StrongName details. Restore that behavior: - Add an Options.ConsoleOutput flag (default true, so the standalone tool is unchanged) and have the MSBuild task set it to false. The task consumes signcheck.log and signcheck.xml directly, so the console output is redundant. - In ProcessSignCheckResults, no longer fail early on the terse "Signing issues found" marker (an expected outcome, not a task failure); only a genuine error left in the log after stripping that marker fails early. This lets the per-file report run. - Select the full <File> elements from the results XML instead of only @name, so the report again includes AuthentiCode and StrongName details for each offending file. Co-authored-by: Copilot <[email protected]>
Source-build only public-signs its outputs, so binaries inside the source-built intermediate and SDK tarballs carry a valid public key but a placeholder (zero-filled) strong-name signature. SignCheck's full strong-name verification correctly rejects these, causing false 'unsigned' failures. Exclude the source-built tarballs via IGNORE-STRONG-NAME. Co-authored-by: Copilot <[email protected]>
akoeplinger
force-pushed
the
akoeplinger/signcheck-burn-windows-guard
branch
from
July 8, 2026 09:14
5ced9fa to
d4e0d25
Compare
ViktorHofer
approved these changes
Jul 8, 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.
This PR bundles a few related fixes to VMR signing validation / SignCheck that were found while testing signing validation on the release branch.
1. Skip Burn bundle CAB extraction on non-Windows
ExeVerifierunconditionally tried to extract Burn bundle containers, which CAB-unpacks via the native Windows-onlycabinet.dlland throwsDllNotFoundExceptionon Linux/macOS. Guarded the Burn extraction so it only runs on Windows (moved the OS check into theVerifyRecursivebranch).2. Fix DAC exclusion entries being split across lines
The dynamically-appended
mscordaccore.dll/mscordbi.dllexclusions used a raw;;in theSignCheckExclusionItemIncludevalue. MSBuild treats;as an item separator, so each entry was written to the generated exclusions file as two separate lines instead of the requiredfilename;;commentsingle-line format, breaking those DAC exclusions when DAC signing is disabled. Escaped the separators as%3B.3. Restore detailed signing-validation output and stop flooding the build log
Since signing validation moved to the in-proc
SignCheckTask, the SignCheckConsoleLoggerwrites every processed file to stdout, which MSBuild echoes into the build log (thousands ofSigned: Truelines), and the per-fileAuthentiCode/StrongNamedetails of the offending files were no longer surfaced.Options.ConsoleOutputflag (defaulttrue, so the standalone tool is unchanged); the MSBuild task sets it tofalsesince it consumessigncheck.log/signcheck.xmldirectly.ProcessSignCheckResultsno longer fails early on the terse "Signing issues found" marker (an expected outcome), only on a genuine error remaining after stripping it, so the per-file report runs.<File>elements from the results XML instead of only@Name, restoring theAuthentiCode/StrongNamedetails for each offending file.4. Fail with a real error instead of MSB4181
When SignCheck finds signing issues it returns a non-zero exit code but does not log an MSBuild error, so the build failed with the generic
MSB4181("task returned false but did not log an error"). The task now logs a real error at theSignCheck.Run()call site when the result is non-zero, and the now-redundant catch-all<Error>inProcessSignCheckResultswas removed (the per-file report is still produced).5. Ignore strong-name failures inside source-build tarballs
Source-build only public-signs its outputs, so binaries inside the source-built intermediate and SDK tarballs (
Private.SourceBuilt.Artifacts.*.tar.gz,dotnet-sdk-*-centos.*-x64.tar.gz) carry a valid public key but a placeholder (zero-filled) strong-name signature. SignCheck's full strong-name verification correctly rejects these, producing false "unsigned" failures. AddedIGNORE-STRONG-NAMEexclusions for those tarballs.