Skip to content

ci: authenticate claude-code-action via workload identity federation - #17173

Merged
mikeldking merged 2 commits into
mainfrom
claude/nice-einstein-shp9vc
Oct 23, 2026
Merged

mikeldking merged 2 commits into
mainfrom
claude/nice-einstein-shp9vc

Conversation

@mikeldking

Copy link
Copy Markdown
Collaborator

Switches every anthropics/claude-code-action workflow from the static ANTHROPIC_API_KEY secret to OIDC workload identity federation.

Changes

  • In all 12 workflows that use the action (claude*.yml, cost-sync.yml, check-dependabot-uv-version.yml), the anthropic_api_key input is replaced with anthropic_federation_rule_id, anthropic_organization_id, anthropic_service_account_id and anthropic_workspace_id. The pinned v1.0.240 already supports these inputs.
  • id-token: write is added to the 10 jobs that didn't have it. claude.yml and claude-code-review.yml already had it.
  • No privilege change: jobs that pass github_token: ${{ github.token }} still use that read-only token. The action's setupGitHubToken returns early when a token is provided, so the new OIDC permission doesn't mint a write-scoped Claude App token.

Notes

  • The IDs are written straight into the workflows. They identify resources and are not credentials.
  • Workflows that call the API without the action (plugin-evals, harbor-evals, pxi-online-evals, factory-*) still use ANTHROPIC_API_KEY and are unchanged.
  • The federation rule must trust this repo's OIDC claims for every trigger used: pull_request, issue_comment, issues, schedule and workflow_dispatch.

How this PR was made

Made by Claude Code at the user's request. Checks done: every workflow parses as YAML, and the action's source at the pinned SHA confirms the federation inputs and the early return for a provided token. I haven't run any workflow against the federation rule.


Generated by Claude Code

Replace the static ANTHROPIC_API_KEY secret with OIDC workload identity
federation in every claude-code-action workflow, and grant id-token: write
where it was missing. Jobs that pass github_token still use that token, so
the extra permission does not mint a write-scoped Claude App token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VnDADM9FMiucizWL9yLeV
@mintlify

mintlify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
arize-phoenix 🟢 Ready View Preview Oct 23, 2026, 12:31 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

mikeldking commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator Author

Factory Guard / guard is failing. This is a policy block, not a bug in the diff. The branch isn't under factory/, so the guard must have matched the PR author (mikeldking) against vars.FACTORY_LOGIN. The guard rejects any PR from that login that touches .github/, and every file this PR changes is under .github/workflows/. No fix inside the PR can clear the check, and re-running it would fail the same way.

To unblock, either:

  • point FACTORY_LOGIN at the factory's machine account, if it is set to a human login by mistake, then re-run the check, or
  • have a different maintainer open a PR from claude/nice-einstein-shp9vc, or merge this one with an admin override.

Generated by Claude Code

@mikeldking
mikeldking marked this pull request as ready for review October 23, 2026 02:52
@mikeldking
mikeldking merged commit e1a7f0a into main Oct 23, 2026
55 of 56 checks passed
@mikeldking
mikeldking deleted the claude/nice-einstein-shp9vc branch October 23, 2026 03:04
@github-project-automation github-project-automation Bot moved this from 📘 Todo to ✅ Done in phoenix Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants