Commit c7fe3e4
committed
Pass event values through the environment, never into the script
Both run blocks interpolated ${{ }} straight into the shell, which is the
pattern GitHub's script injection guidance warns about: the expression is
expanded before the shell sees it, so the value becomes part of the command
rather than an argument to it. The two values here are a SHA and a number, so
there is nothing to inject today, but the shape is the finding
FIX_SHA and PR_NUMBER now arrive as environment variables and the scripts
quote them, matching what the rest of the repository does
Raised by AppSec against the backport-stack/ci branch, V22652331591 parent f9d2a7e commit c7fe3e4
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
62 | 67 | | |
63 | | - | |
64 | | - | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| 99 | + | |
| 100 | + | |
95 | 101 | | |
96 | 102 | | |
| 103 | + | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
| |||
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
105 | | - | |
106 | | - | |
| 112 | + | |
0 commit comments