Commit 75bb7f0
committed
fix: address Semgrep finding - pass action inputs through env, not inline
${{ inputs.x }} interpolated directly into a run: step's script body is a
shell-injection risk (Semgrep flagged it): the value gets substituted as
literal script text before the shell runs it, so a malicious input value
could break out of the intended string and execute arbitrary commands.
None of this action's current call sites pass attacker-controlled values,
but it's a reusable composite action, so fixing the pattern itself rather
than relying on today's callers being safe.
Passes role-arn/role-session-name/aws-region through env: instead, so the
shell treats them as data (env var expansion) rather than script text.1 parent e95902f commit 75bb7f0
1 file changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
20 | 28 | | |
21 | 29 | | |
22 | 30 | | |
| |||
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
51 | | - | |
52 | | - | |
| 59 | + | |
| 60 | + | |
53 | 61 | | |
54 | 62 | | |
55 | 63 | | |
| |||
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
73 | | - | |
74 | | - | |
| 81 | + | |
| 82 | + | |
75 | 83 | | |
76 | 84 | | |
77 | | - | |
| 85 | + | |
0 commit comments