-
Notifications
You must be signed in to change notification settings - Fork 4
Don't stop verification on recoverable errors. #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modifies the verification logic to continue processing all images in a request even when individual image verification fails, rather than stopping at the first error. The provider now returns individual error responses for each problematic image instead of a single system error.
Key changes:
- Changed error handling to continue verification for all images rather than stopping on the first error
- Updated error messages to distinguish between invalid references (
_invalid), unsigned images (_unsigned), and invalid signatures (_sig_invalid) - Modified constraint templates to remove the specific check for
_unsignederrors, allowing all error types to trigger violations
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/provider/provider.go | Changed error handling to append individual item errors and continue processing instead of returning system errors |
| pkg/provider/provider_test.go | Updated test assertions to check for item-level errors with new suffixes instead of system errors |
| scripts/integration_test.sh | Added integration test for multiple image verification scenario |
| validation/from-repo-constraint-template.yaml | Removed specific _unsigned error filtering to handle all error types |
| validation/from-org-with-signer-constraint-template.yaml | Removed specific _unsigned error filtering to handle all error types |
| validation/from-org-constraint-template.yaml | Removed specific _unsigned error filtering to handle all error types |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
If there are multiple images in the provider request, verify all unless there is a system error. Return a response with errors for each image.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
f16a9f5 to
85590e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
If there are multiple images in the provider request, verify all unless there is a system error. Return a response with errors for each image.