Skip to content

Commit 87e0676

Browse files
dougaitkenclaude
andcommitted
fix(ci): don't persist token in fork PR checkout
Copilot review on #2239 flagged that the fork-controlled checkout still had the workflow's GITHUB_TOKEN persisted in its .git/config. Disable credential persistence for that step as defense-in-depth. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 0d56f65 commit 87e0676

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/validate-companies.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
# profiles) only, never .github/ workflows or scripts, and nothing
3838
# from the fork is executed. See https://gh.io/securely-using-pull_request_target
3939
allow-unsafe-pr-checkout: true
40+
# Defense-in-depth: don't persist the workflow token into this
41+
# fork-controlled checkout's .git/config.
42+
persist-credentials: false
4043

4144
- name: Get changed files
4245
id: changed

0 commit comments

Comments
 (0)