Skip to content

fix(ci): limit credential exposure in fix-drift#212

Merged
jpr5 merged 1 commit into
mainfrom
fix/persist-credentials-drift
May 15, 2026
Merged

fix(ci): limit credential exposure in fix-drift#212
jpr5 merged 1 commit into
mainfrom
fix/persist-credentials-drift

Conversation

@jpr5
Copy link
Copy Markdown
Contributor

@jpr5 jpr5 commented May 15, 2026

Summary

fix-drift.yml runs Claude Code AI auto-fix with API keys and write-scoped
GITHUB_TOKEN persisted in git config for ~30 minutes. Prompt injection via
crafted repo content could exfiltrate the git credentials.

  • Add persist-credentials: false to the checkout step so GITHUB_TOKEN is not
    stored in .git/config for the duration of the run
  • Inject url.insteadOf credentials only in the "Configure git for push" step,
    scoped to the PR creation phase (not the 30-minute Claude Code execution)
  • Remove fix-drift.yml from zizmor artipacked suppression list since the
    underlying issue is now fixed

The fix-drift.ts --create-pr path uses git push directly (via
execFileSafe), so the url.insteadOf pattern is required. The gh pr create
and gh pr merge commands use GH_TOKEN env var which is already set.

…: false

fix-drift.yml runs Claude Code with API keys and write-scoped GITHUB_TOKEN
persisted in git config for ~30 minutes. Prompt injection via crafted repo
content could exfiltrate the git credentials.

Changes:
- Add persist-credentials: false to checkout step
- Inject url.insteadOf credentials only before push (scoped to the
  "Create PR" phase, not the entire 30-minute Claude Code run)
- Remove fix-drift.yml from zizmor artipacked suppression list
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 15, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@copilotkit/aimock@212

commit: 9dcb211

@jpr5 jpr5 merged commit c9f2787 into main May 15, 2026
15 checks passed
@jpr5 jpr5 deleted the fix/persist-credentials-drift branch May 15, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant