Skip to content

Simplify public API for the verifier and improve error handling#35

Merged
rdimitrov merged 4 commits intomainfrom
simplify-verifier
Feb 22, 2026
Merged

Simplify public API for the verifier and improve error handling#35
rdimitrov merged 4 commits intomainfrom
simplify-verifier

Conversation

@rdimitrov
Copy link
Member

@rdimitrov rdimitrov commented Feb 21, 2026

The following PR:

  • verifier.New and verifier.VerifyServer now accept *registry.Provenance directly instead of *registry.ImageMetadata, removing unnecessary coupling to the registry-specific struct
  • VerifyServer now returns error instead of (bool, error) — callers use errors.Is to distinguish outcomes
  • Added sentinel errors ErrImageNotSigned and ErrProvenanceMismatch so callers can tell apart an unsigned image from a provenance mismatch
  • VerifyServer now uses any-match semantics: returns nil if at least one bundle matches the expected provenance, rather than requiring all bundles to match

Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
@rdimitrov rdimitrov changed the title Use provenance instead of imageMetadata for verifier Simplify public API for the verifier and improve error handling Feb 21, 2026
@rdimitrov rdimitrov merged commit 0fa5044 into main Feb 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants