Skip to content

feat: embed Rekor bundle in OCI attestation layer annotations#1610

Open
ab-ghosh wants to merge 1 commit into
tektoncd:mainfrom
ab-ghosh:feat/embed-rekor-bundle-oci-attestation
Open

feat: embed Rekor bundle in OCI attestation layer annotations#1610
ab-ghosh wants to merge 1 commit into
tektoncd:mainfrom
ab-ghosh:feat/embed-rekor-bundle-oci-attestation

Conversation

@ab-ghosh
Copy link
Copy Markdown
Member

@ab-ghosh ab-ghosh commented Apr 3, 2026

Changes

This PR adds support for embedding the Rekor transparency log bundle (dev.sigstore.cosign/bundle) in OCI attestation layer annotations when transparency.enabled=true. This enables offline signature verification of attestations signed by Tekton Chains using keyless (Fulcio) signing, bringing Chains' attestation format in line with what cosign attest produces.

Fixes #1598

/kind feature

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Embed Rekor bundle in OCI attestation layer annotations to enable offline verification of keyless-signed attestations.

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 3, 2026
@tekton-robot tekton-robot requested review from jkhelil and lcarva April 3, 2026 09:01
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 3, 2026
Copy link
Copy Markdown
Member

@infernus01 infernus01 left a comment

Choose a reason for hiding this comment

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

@ab-ghosh Would it be good to write this feature in the docs as well?

Comment thread pkg/chains/signing/iface.go Outdated
@@ -41,4 +42,6 @@ type Bundle struct {
Cert []byte
// Cert is an optional PEM encoded x509 certificate chain, if one was used for signing.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not related to this PR but I just got eyes on this.

Suggested change
// Cert is an optional PEM encoded x509 certificate chain, if one was used for signing.
// Chain is an optional PEM encoded x509 certificate chain, if one was used for signing.

@tekton-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign jkhelil after the PR has been reviewed.
You can assign the PR to them by writing /assign @jkhelil in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Copy Markdown
Member Author

@ab-ghosh ab-ghosh left a comment

Choose a reason for hiding this comment

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

@infernus01 Good eyes on the comment typo And yes, documenting this feature makes sense, let me add that.

  When transparency.enabled=true, the Rekor bundle (SignedEntryTimestamp,
  integratedTime, logIndex, logID) is now embedded as a
  dev.sigstore.cosign/bundle annotation on the OCI attestation layer.
  This enables offline signature verification of attestations signed
  by Tekton Chains using keyless (Fulcio) signing.

  Previously, the Rekor upload happened after storage, so the bundle
  was not available when writing attestations to OCI registries. The
  upload is now performed before storage so the bundle can be passed
  through to the OCI backend.

  Fixes tektoncd#1598

Signed-off-by: ab-ghosh <abghosh@redhat.com>
@ab-ghosh ab-ghosh force-pushed the feat/embed-rekor-bundle-oci-attestation branch from ee8dec2 to 1b32257 Compare May 11, 2026 11:26
Comment thread pkg/chains/signing.go
Comment on lines +194 to +196
if err != nil {
return err
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems to be a hard return. What if getRekor() fails (maybe due to bad rekor URL config or anything) and this might prevent all attestation storage. WDYT?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this hard return is pre-existing, IMO if getRekor fails, it's a config error, should not be treated as a transient failure

Comment on lines 166 to 170
Bundle: &signing.Bundle{
Content: rawPayload,
Signature: []byte(signature),
Cert: []byte(storageOpts.Cert),
Chain: []byte(storageOpts.Chain),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One thing i noticed that the RekorBundle gets passed through in uploadAttestation below but not in uploadSignature here. since simplesigning + x509/fulcio + rekor is a valid config, the same offline-verification gap might exist for OCI image signatures too. right?
was this intentionally out of scope for this PR, or worth handling here as well?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah that totally makes sense, but #1598 is more aligned with attestations. We can address this in a separate issue/PR, what say?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Alright 👍🏻

Copy link
Copy Markdown
Member

@infernus01 infernus01 left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Embed Rekor bundle in OCI attestation layer annotations when transparency.enabled=true

3 participants