Repository navigation
Clarify SignCheck skip reason for files that can't be PGP/Pkg/Mach-O verified - #7216
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refines SignCheck “Skipped (unsupported file type)” reporting so archives that cannot have their own signature verified (missing detached signatures or platform-limited verifiers) can emit verifier-specific skip reasons, reducing confusion while triaging signing output.
Changes:
- Added an overload to create “unsupported file type” results with a custom skip detail string.
- Introduced
ArchiveVerifier.UnsupportedFileTypeDetailso archive verifiers can provide more precise skip reasons without changing helper method signatures. - Updated PGP/.pkg and Mach-O verifiers plus resource strings to surface clearer platform/signature-availability messaging.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/arcade/src/Microsoft.DotNet.SignCheckLibrary/Verification/SignatureVerificationResult.cs | Adds an overload to attach a custom skip detail for unsupported/skipped results. |
| src/arcade/src/Microsoft.DotNet.SignCheckLibrary/Verification/PkgVerifier.cs | Overrides archive skip detail for .pkg/.app verification. |
| src/arcade/src/Microsoft.DotNet.SignCheckLibrary/Verification/PgpVerifier.cs | Overrides archive skip detail for “no PGP signature verified” scenarios and updates comments/doc. |
| src/arcade/src/Microsoft.DotNet.SignCheckLibrary/Verification/MachOVerifier.cs | Uses exception-type-specific skip detail to distinguish unsupported platform vs non–Mach-O inputs. |
| src/arcade/src/Microsoft.DotNet.SignCheckLibrary/Verification/ArchiveVerifier.cs | Adds a virtual skip-detail hook and wires it into unsupported file handling. |
| src/arcade/src/Microsoft.DotNet.SignCheckLibrary/SignCheckResources.resx | Adds new localized skip-detail strings for PGP/.pkg/Mach-O scenarios. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
akoeplinger
force-pushed
the
ClarifySignCheckSkipReason
branch
from
June 13, 2026 09:54
7933f13 to
7e28109
Compare
Replace the misleading 'Skipped (unsupported file type)' message with a composable detail of the form 'Skipped (<reason>; <contents disposition>)': - Reason comes from PlatformNotSupportedException.Message (reworded as user-facing fragments) or, for PgpVerifier's no-.sig path, from an explicit string passed to a new VerifySkipped helper. - Contents disposition is 'recursively verified', 'not verified — run with --recursive', or 'not verified — not supported on this platform', based on VerifyRecursive and a new ContentVerificationSupported virtual (overridden by PkgVerifier off macOS). MachOVerifier keeps a Mach-O-specific message for PNSE and the generic 'unsupported file type' for InvalidDataException. Also fixes a double-period typo in UnsupportedFileTypeResult's doc comment. Co-authored-by: Copilot <[email protected]>
akoeplinger
force-pushed
the
ClarifySignCheckSkipReason
branch
from
June 15, 2026 08:04
7e28109 to
1b55c80
Compare
mmitche
approved these changes
Jun 16, 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.
What
Replaces the misleading
Skipped (unsupported file type)message in SignCheck output with a composable skip detail that clearly states why the file's own signature wasn't verified and what happened to the archive's nested contents:Why
Today, any
.tar.gzwhose detached.sigsidecar isn't present (or wheregpg/MacOsPkg/codesigncan't run on the current platform) is reported as a flatSkipped (unsupported file type)— which reads as "the whole archive was ignored", when in factArchiveVerifier.VerifyContentstill recurses into the archive when--recursiveis enabled. This caused confusion when triaging signing-validation output on Windows for.tar.gzartifacts that only ship.sigfiles on the Linux package feeds.How
Reason fragment comes from one of two places:
PlatformNotSupportedException.Messagethrown by the verifier when its signature check can't run on the current platform. The existing PNSE messages were reworded as user-facing fragments (no trailing period, no internal jargon like "MacOsPkg tooling") so they can be reused for output.VerifySkipped(path, parent, virtualPath, reason)helper, used byPgpVerifierin the no-.sigpath (the only case that isn't a PNSE).Contents disposition is computed from
VerifyRecursiveand a newContentVerificationSupportedvirtual that subclasses override when archive extraction itself is platform-gated. Branches:archive contents recursively verified—--recursiveis on and the platform can unpackarchive contents not verified — run with --recursive to verify nested filesarchive contents not verified — not supported on this platform— platform-unsupported wins over no-recursive, because even with--recursivethe platform still can't unpackPkgVerifieroverridesContentVerificationSupportedtoRuntimeInformation.IsOSPlatform(OSPlatform.OSX)so off-macOS the message correctly says contents weren't verified either.MachOVerifierderives fromFileVerifier(notArchiveVerifier, no nested contents) and keeps a Mach-O-specific message forPlatformNotSupportedExceptionwhile falling back toSkipped (unsupported file type)forInvalidDataException(file genuinely isn't Mach-O).Examples
.tar.gzwithout.sig,--recursiveonSkipped (no PGP signature available to verify; archive contents recursively verified).tar.gzwithout.sig,--recursiveoffSkipped (no PGP signature available to verify; archive contents not verified — run with --recursive to verify nested files).pkgon Windows,--recursiveonSkipped (.pkg signature verification is only supported on macOS; archive contents not verified — not supported on this platform)Skipped (unsupported file type)(unchanged)Also
UnsupportedFileTypeResult's XML doc comment.