Files
moltbot/src
Devin Robison b2e8b7d4bb fix(exec): block heredoc parameter expansion (#69795)
* fix(exec): block heredoc parameter expansion

* chore(changelog): note heredoc parameter expansion fix

* fix(exec): tighten heredoc expansion guardrails

* fix(exec): reject continued heredoc expansions

* fix(exec): buffer heredoc continuation chunks

* fix(exec): harden heredoc continuation parsing

* fix(exec): cap heredoc continuation chunks

* fix(exec): reject continued heredoc param expansion across delimiter

Bash splices `$VAR\\<newline>REST` into `$VARREST` inside an
unquoted heredoc body even when the continued physical line matches the
heredoc delimiter; the heredoc only terminates at EOF with a warning.
The analyzer previously shifted the pending heredoc the moment a line
equaled the delimiter, so a payload like `cat <<KEY\n$OPENAI_API_\\\nKEY`
passed allowlist review while the runtime would expand and print
$OPENAI_API_KEY.

Mirror bash's splicing: only treat a delimiter-matching line as the
terminator when no continuation chunks are pending, otherwise append it
to the logical line and evaluate it through the expansion check. The
tail handler does the same splice + expansion check before falling back
to "unterminated heredoc".
2026-04-21 14:01:35 -06:00
..
2026-04-20 23:33:21 +01:00
2026-04-20 20:30:16 +01:00
2026-04-18 23:16:47 +01:00
2026-04-20 19:55:44 +01:00