https://token.actions.githubusercontent.com. With Workload Identity Federation, the job exchanges that JWT for a short-lived TrueFoundry access token — no long-lived Virtual Account token stored as a repository secret.
TrueFoundry requires a repository claim match on the Virtual Account Claims (or Agent Subject) mapping.
For concepts and the shared exchange API, see Workload Identity Federation.
Prerequisites
- A GitHub repository where you can edit workflows and grant
id-token: write. - A Virtual Account or Agent with the permissions the job needs.
Configure the workflow
GitHub only issues an identity token when the job requests it:truefoundry):
actions/github-script:
Configure TrueFoundry
- Settings > Security & Access > Identity Providers → add provider type GitHub.
- Set:
- Map the Virtual Account (or Agent):
claims)
github: repository. You may add further claim matches (for example ref) when your token includes them and you want to pin them.
Exchange and call TrueFoundry
TFY_ACCESS_TOKEN as Authorization: Bearer against the AI Gateway or APIs. For Agents, set tfy_subject to agent:<agent-name>. Full exchange details: Workload Identity Federation.
Scope the mapping
- Prefer
repository: your-org/your-repoover a broad org-wide pattern. - Add optional claim matches (for example a protected branch
ref) when only specific workflows should authenticate. - Do not store a long-lived VAT in GitHub Secrets when federation is available.