Skip to content

Commit fa99fca

Browse files
fix: Prevent shell injection in GitHub Actions workflow
Fix shell injection vulnerability in e2e-v2.yml by using environment variables instead of direct interpolation of github.ref context data. The github.ref value is now passed through an intermediate environment variable (REF) and accessed with double-quotes in the script to prevent potential code injection attacks. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 819f027 commit fa99fca

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/e2e-v2.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,10 @@ jobs:
291291

292292
- name: Sentry Release
293293
if: ${{ steps.platform-check.outputs.skip != 'true' }}
294+
env:
295+
REF: ${{ github.ref }}
294296
run: |
295-
SENTRY_RELEASE_CANDIDATE=$(echo 'e2e/${{ github.ref }}' | perl -pe 's/\//-/g')
297+
SENTRY_RELEASE_CANDIDATE=$(echo "e2e/$REF" | perl -pe 's/\//-/g')
296298
echo "SENTRY_RELEASE=$SENTRY_RELEASE_CANDIDATE" >> $GITHUB_ENV
297299
298300
- name: Sentry Dist

0 commit comments

Comments
 (0)