You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Drop sh -c in RunShellExecutor, add command allowlist #1604
RunShellExecutor passes the assembled command string to ProcessBuilder("sh", "-c", command). This means shell metacharacters (;, |, &&, $(...), backticks) in jq-resolved values are interpreted by the shell, making any command allowlist trivially bypassable.
For example, even if only echo is allowed:
command: ${ "echo " + .user.input }
An input of hello; rm -rf / becomes sh -c 'echo hello; rm -rf /' — the shell executes both commands.
Proposal
1. Replace sh -c with direct ProcessBuilder execution using an argv array.
The spec already separates command (the executable) and arguments (the parameters). Map them directly:
The resolved command (argv[0]) is compared against the allowlist as an exact string match.
Empty list (default) = no shell execution allowed.
Integrating frameworks pass their configuration through this API.
3. Pipes, subshells, and redirection are no longer available.
This is intentional. Users who need pipelines should wrap them in a dedicated script and allowlist that script name. This keeps the trust model clear: deployers control what executables are available, workflow authors control how to invoke them.
Scope
RunShellExecutor and RunShellExecutorBuilder in impl-core
WorkflowApplication (new allowlist API)
CommandPropertySetter in impl-container is a separate concern (tracked separately)
Activity
[Fix open-workflow-specification#1604] Shell refactor
[Fix open-workflow-specification#1604] Zanini comments
[Fix open-workflow-specification#1604] Zanini comments
[Fix open-workflow-specification#1604] Zanini comments
[Fix #1604] Shell refactor (#1605)