Skip to content

Conversation

@jiparis
Copy link
Member

@jiparis jiparis commented Dec 5, 2025

This change ensures that the attestation bundle is verified on attestation push, failing if the signature is not recognized (only when chainloop is the signer)

Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
@jiparis jiparis requested review from javirln and migmartri December 5, 2025 15:24
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>
Copy link
Member

@migmartri migmartri left a comment

Choose a reason for hiding this comment

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

Awesome

}

// verify attestation (only if chainloop is the signer)
result, err := uc.verifyBundle(ctx, rawContent)
Copy link
Member

Choose a reason for hiding this comment

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

where is the logic that makes sure the bundle is verified when keyless signing was used?


func (uc *WorkflowRunUseCase) Verify(ctx context.Context, run *WorkflowRun) (*VerificationResult, error) {
func (uc *WorkflowRunUseCase) VerifyRun(ctx context.Context, run *WorkflowRun) (*VerificationResult, error) {
return uc.verifyBundle(ctx, run.Attestation.Bundle)
Copy link
Member

Choose a reason for hiding this comment

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

is there any case where run.Attestation would be empty?

Copy link
Member

Choose a reason for hiding this comment

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

it seems it will not, makes sense.

}

// if it's verifiable, make sure it passed
if result != nil && !result.Result {
Copy link
Member

Choose a reason for hiding this comment

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

oh, so result will be nil if can't be verified? I'd make it more explicit somehow

Copy link
Member Author

Choose a reason for hiding this comment

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

yes in that case it would return nil, nil. I agree it should return something more explicit.

@jiparis jiparis merged commit ed92f11 into chainloop-dev:main Dec 5, 2025
16 of 17 checks passed
@jiparis jiparis deleted the verify-on-push branch December 5, 2025 16:02
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