Agent actions for Claude Code, Codex, and Gemini CLI run inside GitHub workflows, and several can reach model providers on Bedrock, Vertex AI, or Google Cloud through OIDC instead of long lived keys. Scope the cloud trust policy to the repository, branch, and workflow that runs the agent. Keep the workflow token's own permissions minimal too.
Read in this order
- OfficialClaude Code GitHub ActionsStart here: a real agent in a workflow, including cloud provider auth options.
- OfficialGitHub: Use GITHUB_TOKEN for authentication in workflowsTrim GITHUB_TOKEN permissions so a hijacked agent can do less.
- OfficialGitHub Actions: OpenID ConnectThe OIDC claims you pin in a cloud trust policy.