Skip to content

Update sigstore-go to v1.2.0 - #4914

Merged
codysoyland merged 2 commits into
mainfrom
update-sigstore-go-v1.2.0
Jun 5, 2026
Merged

codysoyland merged 2 commits into
mainfrom
update-sigstore-go-v1.2.0

Conversation

@codysoyland

@codysoyland codysoyland commented Jun 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Bumps sigstore-go from v1.1.4 to v1.2.0, which encodes DSSE envelopes as hashedrekord entries on Rekor v2.

  • Bump sigstore-conformance action to v0.0.29 and drop the message-digest-mismatch xfail; cosign now correctly rejects bundles with mismatched artifact digests.
  • Bump go-containerregistry to v0.21.6: close the Bundle() layer reader to release tokens for its new per-fetcher pull limiter (was deadlocking multi-bundle verifies), and switch kind-verify-attestation to --allow-http-registry since v0.21.6 narrowed the .local auto-insecure regex to .localhost.
  • Adjust tests for transitive deps: timestamp-authority v2.1.2 requires default-policy-oid; tlog body parsing now requires a valid Rekor v1 or v2 body.

Closes #3599

@codysoyland
codysoyland requested review from a team as code owners June 3, 2026 18:25

@Hayden-IO Hayden-IO left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is our existing e2e test coverage sufficient or do we need another test?

@codysoyland

codysoyland commented Jun 3, 2026 •

Copy link
Copy Markdown
Member Author

Is our existing e2e test coverage sufficient or do we need another test?

It may be worth another test. I'll take a closer look.

@codysoyland
codysoyland force-pushed the update-sigstore-go-v1.2.0 branch from c3c1109 to 14eddff Compare June 3, 2026 18:52
@codysoyland
codysoyland marked this pull request as draft June 3, 2026 19:01
sigstore-go v1.2.0 encodes DSSE envelopes as hashedrekord entries
on Rekor v2. Bump conformance action to v0.0.29 and remove the
message-digest-mismatch xfail, which now passes. Fix e2e and unit
tests for updated transitive dependencies (timestamp-authority
v2.1.2 requires default-policy-oid config; tlog entry body parsing
now requires a valid Rekor v1 or v2 body).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Cody Soyland <cody.soyland@chainguard.dev>
@codysoyland
codysoyland force-pushed the update-sigstore-go-v1.2.0 branch 2 times, most recently from e4f8fb3 to 65c58bc Compare June 3, 2026 20:53
@codysoyland
codysoyland force-pushed the update-sigstore-go-v1.2.0 branch from 65c58bc to 69f9161 Compare June 4, 2026 18:18
- name: Sign demoimage with cosign
run: |
./cosign sign --signing-config=${signingconfig} --trusted-root=${trustedroot} --yes --allow-insecure-registry ${demoimage} --identity-token ${OIDC_TOKEN}
./cosign sign --signing-config=${signingconfig} --trusted-root=${trustedroot} --yes --allow-http-registry ${demoimage} --identity-token ${OIDC_TOKEN}

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.

--allow-http-registry is the correct flag here. Previously it was automagically using http due to a .local domain. go-containerregistry v0.21.6 changed the regex that auto-detects a local registry as plain HTTP from .local to .localhost, so registry.local:5000 is no longer treated as insecure automatically.


func makeTlogEntry(t *testing.T, integratedTime int64) *tlog.Entry {
body := []byte(`{}`)
body := []byte(`{

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.

Previously, nothing parsed this. The updated verification now decodes the entry body and requires a valid Rekor v1 or v2 structure, so an empty object fails.

Comment thread test/e2e_tsa_test.go
viper.Set("timestamp-signer", "memory")
viper.Set("timestamp-signer-hash", "sha256")
viper.Set("disable-ntp-monitoring", true)
viper.Set("default-policy-oid", "1.3.6.1.4.1.57264.2")

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.

timestamp-authority v2.1.2 requires a TSA policy OID to be configured.


expiredLeafCert, _ := test.GenerateLeafCertWithExpiration(identity, issuer,
time.Now().Add(-time.Hour), leafPriv, rootCert, rootPriv)
time.Now().Add(-10*time.Minute), leafPriv, rootCert, rootPriv)

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.

These changes were made to keep the timestamp's genTime (ts.Time) within both cert validity windows (the TSA's, newly enforced in v2.1.2, and the Fulcio leaf's) while keeping the leaf expired.

Two fixes for the Rekor v2 / sigstore-go v1.2.0 attestation path:

- oci/remote.Bundle never closed the reader returned by Uncompressed(),
  leaking a slot in go-containerregistry's pull limiter. Repeated calls
  (e.g. GetBundles walking multiple attestations) exhaust the limiter and
  block forever, hanging TestSignVerifyBundle and the vuln
  verify-attestation e2e step.

- go-containerregistry v0.21.6 narrowed the local registry regex from
  `.local` to `.localhost`, so `registry.local:5000` is no longer
  auto-detected as HTTP. Use the correct `--allow-http-registry` flag.

Signed-off-by: Cody Soyland <cody.soyland@chainguard.dev>
@codysoyland
codysoyland force-pushed the update-sigstore-go-v1.2.0 branch from 69f9161 to de81686 Compare June 4, 2026 19:26
if err != nil {
return nil, err
}
defer layer0.Close()

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.

go-containerregistry added a pull limiter and these unclosed writers caused it to deadlock.

@codysoyland

Copy link
Copy Markdown
Member Author

Added e2e tests for rekor2 in #4916. I pushed them separately to keep this PR small, but I can merge them if preferred.

Also uncovered a data race: https://github.com/sigstore/cosign/pull/4917/changes

@codysoyland
codysoyland marked this pull request as ready for review June 4, 2026 19:30

@steiza steiza 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.

Nice work!

@codysoyland
codysoyland merged commit 6115844 into main Jun 5, 2026
30 checks passed
@codysoyland
codysoyland deleted the update-sigstore-go-v1.2.0 branch June 5, 2026 17:56
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.

Attestations require uploading entire payload to rekor

3 participants