Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. Source inspection shows current main lets Real behavior proof Next step before merge Security Review findings
Review detailsBest possible solution: Keep the exec preflight boundary, inspect direct path-like shell script targets regardless of arbitrary dotted names or by shebang, add focused regression coverage, rebase, and rerun targeted exec checks with real behavior proof. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main lets Is this the best way to solve the issue? No. The exec preflight boundary is the right approach, but this implementation remains incomplete until dotted path-like direct shell scripts are inspected before execution. Full review comments:
Overall correctness: patch is incorrect Security concerns:
Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against d94e7f5114dc. |
3ce98f9 to
a4c2e09
Compare
|
@clawsweeper re-review |
this is for maintainers only! |
@vincentkoc noted. This is what happened - maybe the clawsweeper skill could be more explicit about not re-triggering for non maintainers
|
|
Closing this instead of continuing the current implementation. The underlying bug is real: agent A better follow-up should rethink the boundary around execution context and message delivery itself, with any command parsing kept as narrow defense-in-depth. I do not want to keep expanding this PR reactively and make it harder to review or trust. |

Summary
execcould runopenclaw message ...delivery commands and send a real provider message outside the tracked reply/message-tool path; the observed duplicate was WhatsApp, but the bug was generic to message delivery commands.execnow rejects OpenClaw message delivery commands across direct CLI, package-runner, shell-wrapper, heredoc/here-string, and shell-script forms, while preserving non-delivery commands like help, dry-run, read, search, and thread list.exec.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
execclassified interactive approval/channel-login commands as unsafe, but did not classify OpenClaw message CLI delivery as unsafe even though it can deliver provider messages outside the current reply path.Regression Test Plan (if applicable)
src/agents/bash-tools.exec.script-preflight.test.tsexecrejects message delivery commands across direct, wrapped, package-runner, heredoc/here-string, shell script, sourced script, chained script, outside-workdir readable script, and full gateway exec modes.User-visible / Behavior Changes
execnow refuses OpenClaw message delivery commands. Agents should reply normally in the current conversation or use themessagetool for explicit cross-channel sends.Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) YesYes/No) NoYes, explain risk + mitigation: The exec surface is narrowed for OpenClaw message delivery commands so provider sends stay on tracked reply/message-tool paths.Repro + Verification
Environment
Steps
execto send a response viaopenclaw message send.Expected
execrejects real message delivery commands and instructs the agent to reply normally or use the message tool.Actual
exec.Evidence
Validation:
pnpm exec oxfmt --check --threads=1 src/agents/bash-tools.exec.ts src/agents/bash-tools.exec.script-preflight.test.ts docs/tools/exec.md CHANGELOG.mdgit diff --checkpnpm test src/agents/bash-tools.exec.script-preflight.test.tspnpm tsgo:corepnpm changed:lanes --jsoncodex review --base origin/maincleanHuman Verification (required)
What you personally verified (not just CI), and how:
env -S, sudo, npm/pnpm/yarn/bun/npx/pnpx/corepack, line continuations, command/process substitutions, grouping, root options, and readable external shell scripts.Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
Real behavior proof
execnow refuses OpenClaw message delivery commands, including direct CLI, package-runner, shell-wrapper, generated shell, heredoc, here-string, and script-file variants.origin/main.pnpm test src/agents/bash-tools.exec.script-preflight.test.ts src/agents/bash-tools.exec.path.test.ts src/agents/bash-tools.exec-host-gateway.test.tsin the local OpenClaw checkout.Test Files 3 passed;131 passed,4 skipped, total135tests in the exec preflight/path/gateway group.