1
0
mirror of synced 2026-10-24 12:59:22 +03:00
Files
cosign/pkg/providers/github/github_test.go
Eugene Kalinin e9af93ff29 fix(providers): clearer errors when GitHub OIDC token request fails (#5062)
The GitHub Actions provider decoded the response body without checking the
status code, so a failing OIDC endpoint surfaced as a raw json error:

  fetching ambient OIDC credentials: invalid character 'u' looking for
  beginning of value

Check the status code first and report it along with a truncated body, and
wrap decode failures with the provider name:

  fetching ambient OIDC credentials: identity token request to provider
  github-actions failed with status 502 Bad Gateway: "upstream connect
  error or disconnect/reset before headers"

Fixes #4438

Signed-off-by: Eugene Kalinin <e.v.kalinin@gmail.com>
2026-08-18 09:09:02 -07:00

4.1 KiB