Skip to content

Commit 1dbb360

Browse files
ci: Replace ad-m/github-push-action@master with native git push
The plugin-SDK auto-bump workflow used ad-m/github-push-action pinned to the upstream master branch. That is a textbook CWE-829: a supply-chain compromise of the action's master would inject arbitrary shell into every Ethereum-plugin auto-PR run, with write access to every LedgerHQ/app-plugin-* repository through the CI bot token. Pinning to a SHA would reduce but not remove that risk. Instead, replace the action with the same `git remote set-url` + `git push` pattern already used by ledger-app-workflows' _open_pr_with_new_snapshots.yml. The push step now runs only the shell visible in this file and uses the same CI_BOT_TOKEN as before. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent e59e5c9 commit 1dbb360

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/pr_on_all_plugins.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,18 +126,21 @@ jobs:
126126
echo "Branch Name: $branch_name"
127127
echo "Title: $title"
128128
git status
129+
git checkout -b "$branch_name"
129130
git commit -am "$title"
130131
# Set output
131132
echo "title=$title" >> $GITHUB_OUTPUT
132133
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT
133134
134135
- name: Push commit
135-
uses: ad-m/github-push-action@master
136-
with:
137-
github_token: ${{ secrets.CI_BOT_TOKEN }}
138-
branch: ${{ steps.commit-changes.outputs.branch_name }}
139-
repository: LedgerHQ/${{ matrix.repo }}
140-
force: true
136+
env:
137+
GH_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
138+
run: |
139+
# Push the branch via the CI bot token.
140+
branch_name="${{ steps.commit-changes.outputs.branch_name }}"
141+
git remote set-url origin \
142+
"https://x-access-token:${GH_TOKEN}@github.com/LedgerHQ/${{ matrix.repo }}.git"
143+
git push -u origin "$branch_name" --force
141144
142145
- name: Create 'auto' label if missing
143146
run: |

0 commit comments

Comments
 (0)