Skip to content

Commit 0c3fc2b

Browse files
EvangelinkCopilot
andauthored
Document GH_AW_GITHUB_TOKEN removal and enterprise 8-day PAT policy (#9588)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 4d655f1 commit 0c3fc2b

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

‎.github/workflows/README.md‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,22 @@ Agentic workflows authenticate through repository secrets:
4343
| Secret / permission | Used for | Notes |
4444
| --- | --- | --- |
4545
| `COPILOT_GITHUB_TOKEN` | GitHub Copilot CLI (model inference) | Fine-grained PAT. **Preferably replaced** by the `copilot-requests: write` permission — see below. |
46-
| `GH_AW_GITHUB_TOKEN` | GitHub MCP reads / safe-output writes that need more than the default `GITHUB_TOKEN` | Fine-grained PAT and the token that used to be forced by lockdown mode. **Preferably replaced** by a GitHub App — see below. |
46+
| `GH_AW_GITHUB_TOKEN` | GitHub MCP reads / safe-output writes that need more than the default `GITHUB_TOKEN` | Fine-grained PAT and the token that used to be forced by lockdown mode. **Preferably replaced** by a GitHub App — see below. **Currently unset**: the compiler's token chain (`GH_AW_GITHUB_MCP_SERVER_TOKEN` \|\| `GH_AW_GITHUB_TOKEN` \|\| `GITHUB_TOKEN`) falls back to the per-run `GITHUB_TOKEN` when this secret is absent, so leave it unset unless a workflow needs elevated access. |
4747

4848
> [!IMPORTANT]
49-
> **Fine-grained PATs expire and, under the `microsoft` org policy, may live at most ~1 week.**
50-
> A PAT-based setup therefore breaks on a short cycle: when the token lapses, every workflow
51-
> that depends on it fails at once and files a burst of `[aw] … failed` issues. Prefer the
52-
> two PAT-free options below — together they let this repo run agentic workflows with **no
53-
> long-lived PAT at all**.
49+
> **Fine-grained PATs expire, and the `Microsoft Open Source` enterprise now hard-rejects any
50+
> fine-grained PAT whose lifetime exceeds 8 days** (the API returns `403` with a message pointing
51+
> at the token's settings page). A PAT-based setup therefore breaks on a short cycle: when the
52+
> token lapses — or simply outlives the 8-day window — every workflow that depends on it fails at
53+
> once (e.g. the `Checkout PR branch` step 403s on the collaborator-permission and PR lookups) and
54+
> files a burst of `[aw] … failed` issues. Prefer the two PAT-free options below — together they
55+
> let this repo run agentic workflows with **no long-lived PAT at all**.
56+
>
57+
> **Fast unblock:** delete the `GH_AW_GITHUB_TOKEN` secret (run `gh secret delete GH_AW_GITHUB_TOKEN --repo microsoft/testfx`).
58+
> Because no source workflow forces a custom PAT anymore (`lockdown` was
59+
> removed repo-wide and all declare `min-integrity: none`), every workflow then degrades gracefully
60+
> to the built-in `GITHUB_TOKEN`. The only case that still needs elevated auth is a write-back on a
61+
> **fork** PR (where `GITHUB_TOKEN` is read-only) — use the GitHub App below for those.
5462
5563
### Preferred: eliminate the expiring PATs
5664

0 commit comments

Comments
 (0)