Skip to content

cosign: fix v3 bundle verify on http and private CA registries + pass TLS to Rekor#2061

Merged
stefanprodan merged 4 commits into
mainfrom
sigstore-transport
Jun 4, 2026
Merged

cosign: fix v3 bundle verify on http and private CA registries + pass TLS to Rekor#2061
stefanprodan merged 4 commits into
mainfrom
sigstore-transport

Conversation

@stealthybox

Copy link
Copy Markdown
Member

Follow-up to #2003.

Fixes:

  • v3 bundle discovery fails on HTTP registries with non-loopback hostnames
    (GetBundles creates internal refs without copying name.Insecure from the original ref)
  • Rekor client ignores certSecretRef CA (uses system trust store only)
  • Deepcopy not regenerated for TrustedRootSecretRef field

Changes:

  • Add WithInsecure and WithTLSConfig options to the cosign verifier
  • Wire both from OCIRepository controller (spec.insecure + transport TLS)
  • Wire both from HelmChart controller (clientOpts.Insecure + clientOpts.TLSConfig)
  • Regenerate deepcopy

Unit test covers the insecure bundle discovery fix using a fake
non-loopback hostname.

Comment thread go.mod Outdated
Signed-off-by: leigh capili <leigh@null.net>
WithInsecure passes name.Insecure to GetBundles/VerifyImageAttestations
for v3 bundle discovery on HTTP registries. Follows the same pattern as
notation's WithInsecureRegistry.

WithTLSConfig passes a *tls.Config to the Rekor client, supporting
private CAs from certSecretRef. Replaces the cosign CLI rekor wrapper
with a direct rekor.GetRekorClient call to thread the option through.

Includes a test using a fake non-loopback hostname to verify the
insecure option is required for bundle discovery on HTTP registries.

Signed-off-by: leigh capili <leigh@null.net>
Pass obj.Spec.Insecure and transport.TLSClientConfig to the cosign
verifier so v3 bundle discovery and Rekor connections use the same
transport settings as the registry.

Signed-off-by: leigh capili <leigh@null.net>
…hart OCI

Pass clientOpts.TLSConfig and clientOpts.Insecure to the cosign
verifier in makeVerifiers so that HelmChart verification of OCI-sourced
charts works against registries behind private CAs and on HTTP.

Signed-off-by: leigh capili <leigh@null.net>
@stealthybox stealthybox force-pushed the sigstore-transport branch from b00f7ba to 34c7c9c Compare June 4, 2026 08:00

@matheuscscp matheuscscp left a comment

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.

LGTM

@stealthybox stealthybox marked this pull request as ready for review June 4, 2026 08:26
@stefanprodan stefanprodan added the area/oci OCI related issues and pull requests label Jun 4, 2026

@stefanprodan stefanprodan left a comment

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.

LGTM

Thanks @stealthybox

@stefanprodan stefanprodan merged commit 867bc3a into main Jun 4, 2026
7 checks passed
@stefanprodan stefanprodan deleted the sigstore-transport branch June 4, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/oci OCI related issues and pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants