Repository navigation
Add Visual Studio telemetry for package-signing revocation outcomes - #7851
Merged
Merged
Conversation
Capture certificate-check observations, rejection attribution, and final package acceptance without changing verification policy or public API signatures. Co-authored-by: Copilot <[email protected]> Copilot-Session: d4ec79f1-0abb-4416-a2fe-ba6943ee07fd
Contributor
|
@dtivel there are some failing tests that might be related to your change, please take a look |
Inject the signature-verification opt-in through the package reader so the mocked verifier runs on Linux and macOS. Leave production verification policy and the process environment unchanged. Co-authored-by: Copilot <[email protected]> Copilot-Session: d4ec79f1-0abb-4416-a2fe-ba6943ee07fd
Contributor
Author
jeffkl
previously approved these changes
Nov 2, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Integrity and allow-list failures leave RejectionReasons as None, causing telemetry to misclassify known rejections as Unknown rather than Other.
2 open issues
What changed in this PR
Adds package-signing telemetry to NuGet’s verification and extraction pipeline for Visual Studio, distinguishing revocation observations from verification decisions and final package acceptance without changing verification policy or public API signatures.
Changes:
- Captures signer and timestamp chain flags, evaluation status, and rejection categories.
- Records warning promotion and final acceptance separately from signature verification.
- Adds tests for revocation outcomes, fallback behavior, parsing failures, and warning policies.
| File | Description |
|---|---|
| test/NuGet.Core.Tests/NuGet.Packaging.Test/SigningTests/SignatureTrustAndValidityVerificationProviderTests.cs | Tests chain observations and rejection attribution. |
| test/NuGet.Core.Tests/NuGet.Packaging.Test/SigningTests/CertificateChainUtilityTests.cs | Tests excluded-root and incomplete-chain classification. |
| test/NuGet.Core.Tests/NuGet.Packaging.Test/PackageExtractorTests.cs | Tests acceptance telemetry under warning policies. |
| src/NuGet.Core/NuGet.Packaging/Telemetry/PackageSigningTelemetryEvent.cs | Aggregates chain observations and rejection telemetry. |
| src/NuGet.Core/NuGet.Packaging/Signing/Verification/SignatureVerificationSummary.cs | Stores per-signature chain and rejection details. |
| src/NuGet.Core/NuGet.Packaging/Signing/Verification/SignatureVerificationRejectionReasons.cs | Defines rejection-category flags. |
| src/NuGet.Core/NuGet.Packaging/Signing/Verification/SignatureTrustAndValidityVerificationProvider.cs | Tracks observations and effective trust blockers. |
| src/NuGet.Core/NuGet.Packaging/Signing/Verification/SignatureChainEvaluationStatus.cs | Defines chain-evaluation categories. |
| src/NuGet.Core/NuGet.Packaging/Signing/Verification/PackageVerificationResult.cs | Carries summaries and rejection metadata. |
| src/NuGet.Core/NuGet.Packaging/Signing/Verification/PackageSignatureVerifier.cs | Preserves observations through parsing failures and emits telemetry. |
| src/NuGet.Core/NuGet.Packaging/Signing/Verification/IntegrityVerificationProvider.cs | Marks integrity failures as non-X509 blockers. |
| src/NuGet.Core/NuGet.Packaging/Signing/Verification/AllowListVerificationProvider.cs | Marks allow-list failures as non-X509 blockers. |
| src/NuGet.Core/NuGet.Packaging/Signing/Utility/CertificateChainUtility.cs | Classifies chain evaluation and retains diagnostic flags. |
| src/NuGet.Core/NuGet.Packaging/Signing/Timestamp/Timestamp.cs | Captures timestamp-chain observations and issue flags. |
| src/NuGet.Core/NuGet.Packaging/Signing/Signatures/Signature.cs | Captures signer-chain observations and issue flags. |
| src/NuGet.Core/NuGet.Packaging/Signing/Signatures/RepositoryPrimarySignature.cs | Preserves summary metadata when adding repository issues. |
| src/NuGet.Core/NuGet.Packaging/Signing/Signatures/RepositoryCountersignature.cs | Preserves summary metadata when adding countersignature issues. |
| src/NuGet.Core/NuGet.Packaging/Signing/Signatures/AuthorPrimarySignature.cs | Preserves summary metadata when adding author issues. |
| src/NuGet.Core/NuGet.Packaging/Signing/SignatureLog.cs | Associates diagnostics with chain flags and converted log messages. |
| src/NuGet.Core/NuGet.Packaging/PackageExtractor.cs | Records final signature acceptance and warning-promotion causes. |
Review effort: Balanced
Co-authored-by: Copilot <[email protected]> Copilot-Session: d4ec79f1-0abb-4416-a2fe-ba6943ee07fd
jeffkl
approved these changes
Nov 4, 2026
This was referenced Nov 5, 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.

Bug
Fixes: https://github.com/NuGet/Client.Engineering/issues/4041
Description
Add Visual Studio telemetry to measure how often NuGet accepts a signed package when it cannot determine whether its signing certificate has been revoked, and why packages are rejected.
Distinguish online/offline operation, skipped or inconclusive checks, warnings promoted to errors, and independent failures such as package tampering. Record final package acceptance separately from verification. Verification policy, public API signatures, and existing event names and status values remain unchanged. New fields contain only categories, booleans, and numeric flags.
Validation after the final code changes
.\cli\dotnet.exe format whitespace --verify-no-changes NuGet.sln --no-restore --verbosity minimal.git diff --checkpassed.cc @aortiz-msft
PR Checklist