security: add persist-credentials false to checkout step

Prevent GITHUB_TOKEN from being stored in .git/config when
checking out PR code in pull_request_target workflows. This
is a security best practice to prevent untrusted code from
potentially accessing stored credentials.

While the Claude Code action doesn't execute arbitrary PR code,
this follows defense-in-depth security principles to minimize
attack surface when handling untrusted code from forks.
This commit is contained in:
LUIS NOVO 2026-01-13 18:47:36 -03:00
parent faa652dce7
commit 21b6809277

View file

@ -33,6 +33,7 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 1
persist-credentials: false
- name: Run Claude Code Review
id: claude-review