Repository navigation
Add signing validation command and notation trust materials - #1984
Merged
lbussell merged 16 commits intoFeb 26, 2026
Merged
Conversation
Add VerifySignaturesCommand that verifies container image signatures using the notation CLI. This includes: - VerifySignaturesCommand and options for CLI integration - NotationClient wrapper for notation CLI operations - Notation trust policy files for supplychain and test environments - Dockerfile changes to install notation and bake in root CA certificates - TrustStoreName configuration property for signature verification - Unit tests for the verification command and notation client Co-authored-by: Copilot <[email protected]>
Use Parallel.ForEachAsync with ConcurrentBag for thread-safe failure collection, matching the pattern used in other commands. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds signature verification capabilities for container images using the notation CLI. It introduces a new VerifySignaturesCommand that reads image references from a merged image-info.json file and verifies signatures against configured trust policies. The implementation includes notation CLI wrapper, trust policy configurations for test and production environments, and corresponding unit tests.
Changes:
- Added NotationClient wrapper for notation CLI operations (verify, import trust policy, add certificates, login)
- Added trust policy JSON files for test and supplychain environments with strict signature verification
- Modified Dockerfile to install notation and download Microsoft Root CA certificates
- Extended SigningConfiguration with TrustStoreName property for verification
- Created VerifySignaturesCommand with registry authentication and signature verification logic
- Updated C# coding guidelines documentation with LINQ preference and interface documentation conventions
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| src/notation-trust/policies/test.json | Trust policy configuration for test environment with strict verification |
| src/notation-trust/policies/supplychain.json | Trust policy configuration for production supplychain environment |
| src/ImageBuilder/Notation/NotationClient.cs | CLI wrapper implementation for notation commands |
| src/ImageBuilder/Notation/INotationClient.cs | Interface defining notation CLI operations |
| src/ImageBuilder/ImageBuilder.cs | Dependency injection registration for NotationClient and VerifySignaturesCommand |
| src/ImageBuilder/Configuration/SigningConfiguration.cs | Added TrustStoreName property and removed TODO comment |
| src/ImageBuilder/Commands/Signing/VerifySignaturesOptions.cs | Command options including image info path and trust materials location |
| src/ImageBuilder/Commands/Signing/VerifySignaturesCommand.cs | Main verification logic with registry login and signature checking |
| src/ImageBuilder.Tests/Notation/NotationClientTests.cs | Basic unit test for NotationClient dry run |
| src/ImageBuilder.Tests/Commands/Signing/VerifySignaturesCommandTests.cs | Comprehensive tests for verification command scenarios |
| src/Dockerfile.linux | Installation of notation and Microsoft Root CA certificates |
| .github/instructions/csharp.instructions.md | Updated coding guidelines with LINQ usage and documentation conventions |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
lbussell
marked this pull request as ready for review
February 25, 2026 20:04
mthalman
approved these changes
Feb 25, 2026
lbussell
commented
Feb 25, 2026
This test was not validating any input/output of the notation CLI, but rather validating some behavior of the execute helper. It didn't provide any value. The notation client is not valuable to test until we have a process abstraction that we can mock.
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.
Add VerifySignaturesCommand that verifies container image signatures using the notation CLI. This includes:
This is part 2/3 of #1376.