Skip to content

Commit 1c72b1a

Browse files
Twixescursoragent
andauthored
ci: Escape new-pr.yml (#3117)
* fix: prevent script injection in new-pr.yml workflow - Use toJSON() to escape user-provided PR body content - Use toJSON() to escape github.actor username - Properly quote variables in bash heredoc - Fixes Wiz security alert for potential script injection Co-authored-by: Michael Matloka <dev@twixes.com> * Quotes not needed now * The other content is safe --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent 8655261 commit 1c72b1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/new-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
echo "is-shame-worthy=false" >> "$GITHUB_OUTPUT"
2828
fi
2929
env:
30-
RAW_BODY: ${{ github.event.pull_request.body }}
30+
RAW_BODY: ${{ toJSON(github.event.pull_request.body) }}
3131

3232
- name: Shame if PR has no description
3333
if: steps.is-shame-worthy.outputs.is-shame-worthy == 'true'

0 commit comments

Comments
 (0)