ci: pass mirror-sync event fields through env instead of interpolating them #109
No reviewers
Labels
No labels
breaking-change
bug
documentation
duplicate
enhancement
good first issue
help wanted
performance
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/ATProto.NET!109
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-mirror-workflow-injection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The mirror-sync workflows (GitHub
sync-issues,sync-prs,sync-comments, and Forgejosync-to-github) spliced event fields intorun:scripts with${{ }}expressions. Those fields are issue/PR titles and bodies, branch names and comment bodies, and they ended up next toFORGEJO_TOKEN/GH_MIRROR_TOKEN.env:and read as a quoted shell variable. Thecat <<'BODYEOF'heredocs are gone.pull_request_targetcheckout setspersist-credentials: false.STATEvariable insync-issues.ymlwas dropped.Verified by parsing all four workflows and asserting no
${{remains inside anyrun:block, plusbash -non each extracted script. The behaviour of the scripts is otherwise unchanged.Follow-up for the maintainer: rotate
FORGEJO_TOKEN(GitHub secret) andGH_MIRROR_TOKEN(Forgejo secret).🤖 Generated with Claude Code
The GitHub sync-issues/sync-prs/sync-comments workflows and the Forgejo sync-to-github workflow spliced issue, PR and comment titles, bodies and branch names into run: scripts with ${{ }} expressions, next to the forge tokens. Every event field now reaches the script as an environment variable read as a quoted shell variable, the body heredocs are gone, and the pull_request_target checkout no longer persists credentials. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Superseded by #108, which fixes the same injection more thoroughly (permissions: {}, bare fetch instead of checkout, CI-config guard). Closing this duplicate.
Pull request closed