Commit 5e047ab
fix(ci): prevent shell injection in claude-code workflow
Move github.event.issue.body/title/number and comment.body from inline
${{ }} expansion in the run: script to the step's env: block. GitHub
Actions substitutes template expressions into the shell script as
literal text before bash runs, so attacker-controlled issue content
could escape the quoted string and execute arbitrary commands.
Reading the values from the process environment via $ISSUE_BODY etc.
avoids re-parsing and closes the injection vector.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7aa4442 commit 5e047ab
1 file changed
+9
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
28 | 36 | | |
29 | 37 | | |
30 | 38 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
0 commit comments