openclaw - 💡(How to fix) Fix [Bug] exec preflight blocks legitimate multi-step commands [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#62467Fetched 2026-04-08 03:03:54
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Timeline (top)
commented ×1

Code Example

[tools] exec failed: exec preflight: complex interpreter invocation detected; refusing to run without script preflight validation. Use a direct `python <file>.py` or `node <file>.js` command.
raw_params={"command":"cd /Users/jayden/.openclaw/workspace/jst_fixtures && python3 test_inventory_fixture.py 2>&1","timeout":45}
RAW_BUFFERClick to expand / collapse

Bug Description

The exec tool preflight checker rejects 'complex interpreter invocation' for legitimate scripts like python3 script.py with cd prefix, even when the script itself is simple and safe.

Frequency

2 occurrences

Log Evidence

[tools] exec failed: exec preflight: complex interpreter invocation detected; refusing to run without script preflight validation. Use a direct `python <file>.py` or `node <file>.js` command.
raw_params={"command":"cd /Users/jayden/.openclaw/workspace/jst_fixtures && python3 test_inventory_fixture.py 2>&1","timeout":45}

Impact

  • Legitimate workflows with cd prefix are blocked
  • Forces awkward rewrites to work around security check

Note

Security intent is correct (blocking injection), but detection is too broad and flags legitimate multi-command sequences.

Suggested Fix

  • Detect only actual injection patterns (semicolon/chains with dangerous args)
  • Allow cd && python script.py type sequences when file exists
  • Provide explicit 'allow cd+python' bypass flag

extent analysis

TL;DR

Implement a more nuanced preflight checker that distinguishes between legitimate and malicious interpreter invocations, potentially by allowing specific patterns like cd && python script.py when the script exists.

Guidance

  • Review the preflight checker's logic to identify why it's flagging legitimate scripts with cd prefixes as "complex interpreter invocations".
  • Consider implementing a whitelist or allowlist for specific command patterns, such as cd && python script.py, to bypass the security check when the script file exists.
  • Evaluate the feasibility of adding an explicit bypass flag, as suggested, to provide users with more control over the security checks.
  • Investigate the possibility of detecting actual injection patterns, such as semicolon-separated commands or chains with dangerous arguments, to improve the accuracy of the preflight checker.

Example

No explicit code example is provided, as the issue does not contain sufficient technical details about the preflight checker's implementation.

Notes

The suggested fix may require significant changes to the preflight checker's logic and may introduce additional security risks if not implemented carefully. It's essential to thoroughly test and validate any changes to ensure they do not compromise the security intent of the checker.

Recommendation

Apply a workaround by implementing a more nuanced preflight checker that allows specific patterns like cd && python script.py when the script exists, as this approach balances security concerns with the need to support legitimate workflows.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING