Skip to content

fix(client): populate Signature field correctly for key-based signatures#1710

Merged
paralta merged 2 commits into
mainfrom
fix/key-signing-verification
Jun 26, 2026
Merged

fix(client): populate Signature field correctly for key-based signatures#1710
paralta merged 2 commits into
mainfrom
fix/key-signing-verification

Conversation

@paralta

@paralta paralta commented Jun 26, 2026

Copy link
Copy Markdown
Member

When #1609 added Signature and ContentType fields to PerSignatureResult, it populated Signature as base64(sig.GetContentBundle()). For key-based signatures, ContentBundle is always empty (it only carries the Sigstore bundle for OIDC), so the reconciler was writing an empty Signature to every key-based row in signature_verifications. The catalogSignatures function in the AI catalog explicitly skips any row where Signature == "", meaning key-signed records silently lost their trustManifest in the /v1/agents response.

The fix uses sig.GetSignature() (the actual base64-encoded cryptographic signature) when ContentBundle is empty, falling back to base64(ContentBundle) only for OIDC signatures where the bundle is the meaningful identifier.

Fixes #1620

@github-actions github-actions Bot added the size/XS Denotes a PR that changes 0-49 lines label Jun 26, 2026
@paralta paralta linked an issue Jun 26, 2026 that may be closed by this pull request
2 tasks
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
client/utils/verify/fetcher.go 50.0% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@paralta
paralta force-pushed the fix/key-signing-verification branch from 79dbe47 to c0ae6c1 Compare June 26, 2026 14:43
@github-actions github-actions Bot added size/S Denotes a PR that changes 50-199 lines and removed size/XS Denotes a PR that changes 0-49 lines labels Jun 26, 2026
paralta added 2 commits June 26, 2026 15:45
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
Signed-off-by: Catarina Paralta <clouropa@cisco.com>
@paralta
paralta force-pushed the fix/key-signing-verification branch from c0ae6c1 to 9fcfb6c Compare June 26, 2026 14:53
@paralta paralta changed the title fix(client/verify): key signing fix(client): populate Signature field correctly for key-based signatures Jun 26, 2026
@paralta
paralta marked this pull request as ready for review June 26, 2026 15:17
@paralta
paralta requested a review from a team as a code owner June 26, 2026 15:17
@paralta
paralta merged commit 22e5bf3 into main Jun 26, 2026
37 checks passed
@paralta
paralta deleted the fix/key-signing-verification branch June 26, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Denotes a PR that changes 50-199 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Key-based signature verification not working

2 participants