Skip to content

Switch from bot PAT to GitHub App token via Azure Key Vault#63538

Open
jakebailey wants to merge 3 commits into
microsoft:mainfrom
jakebailey:github-app-keyvault-auth
Open

Switch from bot PAT to GitHub App token via Azure Key Vault#63538
jakebailey wants to merge 3 commits into
microsoft:mainfrom
jakebailey:github-app-keyvault-auth

Conversation

@jakebailey
Copy link
Copy Markdown
Member

No description provided.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jun 5, 2026
@jakebailey jakebailey force-pushed the github-app-keyvault-auth branch from 4894981 to 3cededd Compare June 5, 2026 21:13
@jakebailey jakebailey marked this pull request as ready for review June 5, 2026 22:16
Copilot AI review requested due to automatic review settings June 5, 2026 22:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates several GitHub Actions workflows to stop using the TS_BOT_GITHUB_TOKEN secret (PAT) and instead mint a short-lived GitHub App token via Azure Key Vault using GitHub OIDC (id-token: write) and azure/login.

Changes:

  • Add OIDC permissions (id-token: write) and bind jobs to the azure environment to support Azure federated authentication.
  • Disable persisted checkout credentials (persist-credentials: false) and push using a GitHub App token configured via an http.https://github.com/.extraheader.
  • Replace workflow consumers of secrets.TS_BOT_GITHUB_TOKEN with microsoft/create-github-app-token-via-key-vault outputs.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/workflows/update-package-lock.yaml Push package-lock.json updates using a Key Vault–minted GitHub App token instead of a PAT.
.github/workflows/twoslash-repros.yaml Run Twoslash repro automation using a GitHub App token minted via Azure Key Vault.
.github/workflows/sync-wiki.yml Sync wiki repos using OIDC→Azure→Key Vault to mint an App token (and configure git auth header).
.github/workflows/sync-branch.yaml Use App token auth for sync/push and for posting workflow result comments.
.github/workflows/set-version.yaml Use App token auth for version bump pushes and workflow result comments.
.github/workflows/pr-modified-files.yml Use App token auth (minted via Key Vault) for PR management automation triggered by pull_request_target.
.github/workflows/new-release-branch.yaml Use App token auth for creating/pushing release branches and posting workflow results.
.github/workflows/lkg.yml Use App token auth for LKG update pushes.
.github/workflows/create-cherry-pick-pr.yml Use App token auth for cherry-pick PR creation and status reporting.
.github/workflows/close-issues.yml Use App token auth (minted via Key Vault) for scheduled issue-closing automation.
.github/workflows/accept-baselines-fix-lints.yaml Use App token auth for pushing baseline/lint/format fixes.

Comment thread .github/workflows/pr-modified-files.yml Outdated
deployment: false
if: github.repository == 'microsoft/TypeScript'

# No need to set explicit permissions; we are using typescript-bot's token, not github-actions' token.
Comment thread .github/workflows/pr-modified-files.yml Outdated
key-id: ${{ vars.TYPESCRIPT_AUTOMATION_GITHUB_APP_KEY_ID }}
owner: microsoft
repositories: TypeScript
permission-contents: write
Comment thread .github/workflows/close-issues.yml Outdated
Comment on lines +47 to +49
permission-contents: write
permission-issues: write
permission-pull-requests: write
Comment on lines +57 to +59
permission-contents: write
permission-issues: write
permission-pull-requests: write
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants