Commit f9a9b06
authored
Harden the greenlight scan against argument injection via just
**Impact:** greenlight scan CI workflow
**Risk:** low
## What
Stop passing dispatch inputs through just's `{{args}}` interpolation.
The justfile now uses `set positional-arguments` with `"$@"`, and the
scan workflow invokes the CLI directly via `mise exec -- uv run
greenlight review`.
## Why
`just review {{args}}` expands `{{args}}` back into the recipe's shell
line, so the free-form `workflow_dispatch` inputs get re-parsed and
re-split by the shell in the step that already holds the App token,
ClickHouse creds, and AWS OIDC session. A crafted input could inject
shell commands or smuggle extra CLI flags (e.g. flipping on
`--allow-untrusted-author`). Quoting the arguments as positionals
(`"$@"`) passes them verbatim with no re-splitting, closing the
injection path while keeping the same argv the workflow already builds.
# Notes
The workflow calls `mise exec -- uv run greenlight review` rather than
`just review` to keep the argv handling in one place; `just run`/`just
review` still work locally and now forward arguments safely.
Signed-off-by: Jean Schmidt <contato@jschmidt.me>{{args}} (#8440)1 parent ee58c63 commit f9a9b06
2 files changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments