Skip to content

fix(cache): verify attestation identity - #343

Draft
nandajavarma wants to merge 1 commit into
mainfrom
n/cache-signer-identity
Draft

fix(cache): verify attestation identity#343
nandajavarma wants to merge 1 commit into
mainfrom
n/cache-signer-identity

Conversation

@nandajavarma

Copy link
Copy Markdown
Contributor

Summary

  • replace WithoutIdentitiesUnsafe with Sigstore certificate-identity verification
  • require the GitHub Actions OIDC issuer and the configured GitHub source repository
  • add an optional exact --slsa-source-ref / LEEWAY_SLSA_SOURCE_REF restriction
  • preserve strict-mode behavior: an identity mismatch rejects the cache entry and triggers a local rebuild

This closes the gap where an artifact with a valid signature from an unrelated signer could be accepted.

Follow-up

After this is released, gitpod-next will pin the new Leeway version and set LEEWAY_SLSA_SOURCE_REF=refs/heads/main for trusted main cache consumers.

Verification

  • go test $(go list ./...)
  • golangci-lint run --new-from-rev=HEAD ./...
  • unit cases cover the trusted main signer, wrong issuer, wrong repository, pull-request ref, and missing repository claim
  • git diff --check

Co-authored-by: Codex <noreply@openai.com>
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