Commit 567d6c5
Fix code injection via github.head_ref in shell context
With pull_request_target, github.head_ref is controlled by the fork
author. Passing it through an environment variable instead of inline
expression syntax prevents shell injection via crafted branch names.
Resolves code scanning alert #8.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 9a8ce6f commit 567d6c5
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
136 | | - | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
0 commit comments