Skip to content

fix: SLSA cache signing retry and Rekor conflicts#341

Merged
leodido merged 4 commits into
mainfrom
fix/slsa-cache-signing-rekor-retry
Jun 10, 2026
Merged

fix: SLSA cache signing retry and Rekor conflicts#341
leodido merged 4 commits into
mainfrom
fix/slsa-cache-signing-rekor-retry

Conversation

@leodido

@leodido leodido commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

Fixes leeway plumbing sign-cache resilience for SLSA cache signing without weakening fail-closed behavior.

  • Adds bounded retry with jitter for transient Sigstore/Rekor signing failures, including HTTP/2 INTERNAL_ERROR, timeouts, temporary network failures, and 429/5xx transport-style failures.
  • Adds --signing-retry-attempts and LEEWAY_SIGNING_RETRY_ATTEMPTS with conservative defaults and bounds.
  • Handles Rekor v1 409 createLogEntryConflict only when Leeway can fetch the existing entry and prove it matches the exact DSSE payload/certificate/signature-derived canonical Rekor body being published.
  • Keeps unverified Rekor conflicts fail-closed and prevents upload when no valid attestation bundle is produced.
  • Adds focused retry, Rekor conflict, and command regression tests.

Validation

  • PATH=/tmp/leeway-test-bin:/tmp/go/bin:$PATH go test ./cmd/... ./pkg/leeway/signing/... -count=1
    • ok github.com/gitpod-io/leeway/cmd 0.137s
    • ok github.com/gitpod-io/leeway/pkg/leeway/signing 5.790s
  • PATH=/tmp/leeway-test-bin:/tmp/go/bin:$PATH go test ./...
    • passed
  • PATH=/tmp/leeway-test-bin:/tmp/go/bin:$PATH go build -o /tmp/leeway-followup .
    • passed
  • PATH=/tmp/leeway-test-bin:/tmp/go/bin:$PATH golangci-lint run ./cmd/... ./pkg/leeway/signing/...
    • reports only pre-existing unrelated findings in cmd/build.go, cmd/exec.go, cmd/experimental-unmount.go, cmd/sbom-export.go, and cmd/init.go; no findings remain in touched signing/sign-cache code.
  • CGO_ENABLED=1 go test -race ./cmd/... ./pkg/leeway/signing/... -count=1
    • not runnable in this container because gcc is not installed (cgo: C compiler "gcc" not found).

Notes

The Rekor conflict recovery is implemented for Rekor v1, matching the observed createLogEntryConflict failure path. Rekor v2 remains on upstream Sigstore behavior because it has different duplicate semantics/API shape.

@leodido leodido self-assigned this Jun 10, 2026
@leodido leodido changed the title Fix SLSA cache signing retry and Rekor conflicts fix: SLSA cache signing retry and Rekor conflicts Jun 10, 2026
leodido and others added 3 commits June 10, 2026 08:11
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
@leodido leodido force-pushed the fix/slsa-cache-signing-rekor-retry branch from 12fd8aa to 2dff5ab Compare June 10, 2026 08:13
Co-authored-by: Codex <noreply@openai.com>
@leodido leodido force-pushed the fix/slsa-cache-signing-rekor-retry branch from 69cb91f to 45c49cb Compare June 10, 2026 09:09
@leodido leodido merged commit dba0037 into main Jun 10, 2026
7 checks passed
@leodido leodido deleted the fix/slsa-cache-signing-rekor-retry branch June 10, 2026 09:17
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