Commit a78d1e2
authored
fix: prevent script injection in GitHub Actions workflows (#1583)
## Summary
- Move `inputs.*` template expressions out of `run:` scripts and into
`env:` blocks across two workflow files
- Replace `$(pwd)` with `${{ github.workspace }}` in `rl-secure.yml` to
maintain correct path resolution after the env var refactor
## Files changed
- `.github/actions/rl-scanner/action.yml` — `inputs.artifact-path` and
`inputs.version`
- `.github/workflows/rl-secure.yml` — `inputs.artifact-name` and
artifact path construction
## Security impact
Interpolating `${{ inputs.* }}` directly into `run:` scripts allows
shell metacharacters in user-controlled input to break out of the
intended command context. Routing through `env:` variables ensures
values are treated as data, not inline script.
> **Note:** `.github/actions/framework/action.yml` was excluded because
its inputs contain shell operators (`>`, `|`, `&&`) that require inline
expansion, and they are not user-controlled.1 parent 99d3cab commit a78d1e2
2 files changed
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | | - | |
45 | | - | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
50 | | - | |
| 52 | + | |
51 | 53 | | |
52 | | - | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | | - | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | | - | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
0 commit comments