Skip to content

fix(githubactions): fetch a fresh ID token on every call - #19

Merged
bonifaido merged 1 commit into
mainfrom
fix/githubactions-no-cache
Oct 1, 2026
Merged

bonifaido merged 1 commit into
mainfrom
fix/githubactions-no-cache

Conversation

@bonifaido

Copy link
Copy Markdown
Member

The GitHub Actions provider cached ID tokens until shortly before expiry, so an early rfc7523 refresh could re-send a token whose jti was already exchanged, which Anthropic WIF rejects as a replay (the same issue platform fixed for JWT-SVIDs in riptideslabs/platform#159). It now fetches a new token on every call, which also removes the lock.

The provider cached tokens until shortly before expiry, so an early
rfc7523 refresh could re-send a token whose jti was already exchanged.
Anthropic WIF rejects that as a replay.

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

The focused implementation and tests correctly enforce fresh token retrieval.

Review effort: Balanced
Findings: None

What changed in this PR

Removes GitHub Actions ID-token caching to prevent replay rejection during RFC 7523 exchanges.

Changes:

  • Fetches a fresh ID token on every call.
  • Removes cache synchronization and updates tests.
File Description
pkg/​token/​githubactions/​githubactions.go Removes token caching and locking.
pkg/​token/​githubactions/​githubactions_test.go Verifies consecutive calls fetch distinct tokens.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bonifaido
bonifaido requested a review from a team September 30, 2026 13:27
@bonifaido
bonifaido requested review from a team and stoader September 30, 2026 13:42
@bonifaido
bonifaido enabled auto-merge (squash) October 1, 2026 07:05
@bonifaido
bonifaido merged commit 6dedbe8 into main Oct 1, 2026
2 checks passed
@bonifaido
bonifaido deleted the fix/githubactions-no-cache branch October 1, 2026 07:42
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.

4 participants