Merge pull request #13052 from RinZ27/fix/ci-shell-injection

ci: fix shell injection in backport workflow
This commit is contained in:
Tobi authored and GitHub committed 2026-01-13 06:36:01 -08:00
commit 2f063a78ba
1 file changed
+3 -1
+3 -1
View File
@@ -25,9 +25,11 @@ jobs:
- uses: actions/checkout@v4
- name: Get backport metadata
# the target branch is the first argument after `/backport`
env:
COMMENT_BODY: ${{ github.event.comment.body }}
run: |
set -euo pipefail
body="${{ github.event.comment.body }}"
body="$COMMENT_BODY"
line=${body%%$'\n'*} # Get the first line
if [[ $line =~ ^/backport[[:space:]]+([^[:space:]]+) ]]; then