Skip to content

Disable cosign's signing config so sidecar signatures work - #395

Merged
fstubner merged 1 commit into
mainfrom
fix/cosign-signing-config
Sep 11, 2026
Merged

Disable cosign's signing config so sidecar signatures work#395
fstubner merged 1 commit into
mainfrom
fix/cosign-signing-config

Conversation

@fstubner

Copy link
Copy Markdown
Owner

See commit message. In short: #393's diagnosis was wrong — the v3 change that broke signing is --use-signing-config defaulting to true, not the bundle format. The gate at signcommon/common.go:660 needs both halves false; #393 set only one, so every leg that reached the signing step failed with must provide --new-bundle-format or --bundle ... with --signing-config or --use-signing-config.

This adds --use-signing-config=false to both sign steps and rewrites the comments, which had recorded the wrong diagnosis as fact.

Sidecar output confirmed reachable by reading sign_blob.go as code: the if ko.BundlePath != "" block closes at line 229, before the outputSignature (231) and outputCertificate (250) writes. Reading grep hits instead of code is how #393 shipped wrong.

CI cannot verify this. No CI job runs release.yml. The proof is a dispatch against v0.3.1.

#393 diagnosed the v0.3.1 signing failure as cosign v3's bundle-format
default and set `--new-bundle-format=false`. That was wrong, and the
re-dispatched release failed at the same step on every leg that reached
it:

  Error: must provide --new-bundle-format or --bundle where applicable
  with --signing-config or --use-signing-config

The gate is signcommon/common.go at v3.0.6, lines 660-661:

  if (useSigningConfig || signingConfigPath != "") &&
      !newBundleFormat && bundlePath == "" {
    return fmt.Errorf("must provide --new-bundle-format or --bundle ...")

It needs both halves false. `--new-bundle-format=false` satisfies one and
leaves `useSigningConfig` standing, which defaults to TRUE in v3
(options/signblob.go:111). So the real v3 change behind this was the
signing config defaulting on, not the bundle format.

Add `--use-signing-config=false` to both sign steps. It is the only gate
that applies: the neighbouring checks at :649 (service URLs) and :656
(tlog-upload) also require a signing config, and the checks at :693-708
all require newBundleFormat true, which stays false here.

`--new-bundle-format=false` is kept on its own account -- with it true,
cosign writes a bundle to --bundle, unset here, instead of the detached
files.

Sidecar output is reachable with both off: sign_blob.go closes its
`if ko.BundlePath != ""` block at line 229, before the outputSignature
(231) and outputCertificate (250) writes. Read as code, not inferred from
a grep -- doing exactly that is how #393 shipped wrong.

Also rewrites both step comments, which stated the #393 diagnosis as fact
and would otherwise have preserved it in the file.

Not verified by CI: no CI job runs release.yml. The proof is a dispatch.
@fstubner
fstubner merged commit e394021 into main Sep 11, 2026
15 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.

1 participant