Skip to content

Commit bc40fc6

Browse files
pranavz28claude
andcommitted
ci: pass CLI branch via env, not inline (fixes semgrep run-shell-injection)
git clone interpolated github.event.inputs.branch directly into the shell. Pass it via env ($BRANCH); it is regex-validated upstream. Part of PER-9772. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent af8b61a commit bc40fc6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ jobs:
4848
restore-keys: v1/${{ runner.os }}/node-${{ matrix.node }}/
4949
- name: Set up @percy/cli from git
5050
if: ${{ github.event_name == 'workflow_dispatch' }}
51+
env:
52+
BRANCH: ${{ github.event.inputs.branch }}
5153
run: |
5254
cd /tmp
53-
git clone --branch ${{ github.event.inputs.branch }} --depth 1 https://github.com/percy/cli
55+
git clone --branch "$BRANCH" --depth 1 https://github.com/percy/cli
5456
cd cli
5557
PERCY_PACKAGES=`find packages -mindepth 1 -maxdepth 1 -type d | sed -e 's/packages/@percy/g' | tr '\n' ' '`
5658
git log -1

0 commit comments

Comments
 (0)