fix(signing): explicitly fetch GitHub OIDC token for Sigstore #252
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes Sigstore signing failure caused by missing OIDC token provisioning.
Fixes Sigstore signing failure caused by missing OIDC token provisioning.
Problem: The
sigstore-go
library requires an explicit JWT token inCertificateProviderOptions.IDToken
, but Leeway was passing an empty struct, assuming the library would auto-fetch from GitHub Actions environment variables.Solution: Implemented
fetchGitHubOIDCToken()
to explicitly retrieve the OIDC token from GitHub Actions using theACTIONS_ID_TOKEN_REQUEST_TOKEN
andACTIONS_ID_TOKEN_REQUEST_URL
environment variables withaudience=sigstore
.Changes:
fetchGitHubOIDCToken()
function to fetch JWT from GitHub OIDC providersignSLSAAttestation()
to call token fetching before Fulcio certificate requestRelated Issue(s)
Fixes https://linear.app/ona-team/issue/CLC-1959/create-leeway-signing-command
How to test
go test -v ./pkg/leeway/signing/... -run TestFetchGitHubOIDCToken
Documentation
No - Internal Leeway implementation fix, no user-facing documentation changes required.