Skip to content

Conversation

@kommendorkapten
Copy link
Member

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.

@kommendorkapten kommendorkapten marked this pull request as ready for review October 31, 2025 09:21
@kommendorkapten kommendorkapten requested a review from a team as a code owner October 31, 2025 09:21
Copilot AI review requested due to automatic review settings October 31, 2025 09:21
Copy link

Copilot AI left a 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 _unsigned errors, 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.

kommendorkapten and others added 5 commits October 31, 2025 11:40
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>
Copy link

@ejahnGithub ejahnGithub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

6 participants