openclaw - ✅(Solved) Fix [Bug]: tools.exec.security: full does not enable inline Python execution (strictInlineEval still blocks) [1 pull requests, 1 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#65102Fetched 2026-04-12 13:25:36
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×3cross-referenced ×1

Description Setting tools.exec.security: full and tools.exec.ask: off in config.yaml does NOT enable inline Python execution. Any attempt to use exec() or evaluate inline code fails with "Obfuscated command detected" or strictInlineEval policy violation.

Expected Behavior With security: full and ask: off, the agent should be able to execute inline Python code without approval prompts or security blocks.

Actual Behavior Inline Python execution is still blocked by an undocumented strictInlineEval policy.

Error Message

See error: "Obfuscated command detected" or strictInlineEval violation Adding "strictInlineEval": false to config (invalid key error) Error observed when attempting inline Python: strictInlineEval: false # Results in "Unrecognized key" error

Root Cause

Description Setting tools.exec.security: full and tools.exec.ask: off in config.yaml does NOT enable inline Python execution. Any attempt to use exec() or evaluate inline code fails with "Obfuscated command detected" or strictInlineEval policy violation.

Expected Behavior With security: full and ask: off, the agent should be able to execute inline Python code without approval prompts or security blocks.

Actual Behavior Inline Python execution is still blocked by an undocumented strictInlineEval policy.

Fix Action

Fix / Workaround

NOT_ENOUGH_INFO for regression testing (no prior working version documented). Workaround: None identified. Manual copy-paste of processed data required.

PR fix notes

PR #65137: fix: [Bug]: tools.exec.security: full does not enable inline Python execution (strictInlineEval still blocks)

Description (problem / solution / changelog)

Summary

Disable strict inline-eval policy requirements when security mode is set to full. The strictInlineEval option will now only block execution when running in standard (allowlist) or untrusted mode.

Changes

  • Update strictInlineEvalRequiresApproval in invoke-system-run.ts to require security !== "full"

Testing

Updated tests to verify that strict inline eval tests fail in allowlist mode but pass in full mode.

Fixes openclaw/openclaw#65102

Changed files

  • src/secrets/runtime-discord.test-support.ts (modified, +3/-2)
  • src/secrets/runtime-matrix.test-support.ts (modified, +3/-2)
  • src/secrets/runtime-nextcloud-talk.test-support.ts (modified, +3/-2)
  • src/secrets/runtime-telegram.test-support.ts (modified, +3/-2)
  • src/secrets/runtime-zalo.test-support.ts (modified, +3/-2)

Code Example

Obfuscated command detected
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Description Setting tools.exec.security: full and tools.exec.ask: off in config.yaml does NOT enable inline Python execution. Any attempt to use exec() or evaluate inline code fails with "Obfuscated command detected" or strictInlineEval policy violation.

Expected Behavior With security: full and ask: off, the agent should be able to execute inline Python code without approval prompts or security blocks.

Actual Behavior Inline Python execution is still blocked by an undocumented strictInlineEval policy.

Steps to reproduce

Steps to Reproduce Set config:

yaml tools: exec: security: full ask: off Restart gateway: openclaw gateway restart

Attempt inline Python: openclaw agent --agent main -m "run python: print('test')"

See error: "Obfuscated command detected" or strictInlineEval violation

Environment text OpenClaw: 2026.4.11 (769908e) OS: Ubuntu on WSL2 (6.6.87.2-microsoft-standard-WSL2) Install: npm global Attempted Fixes openclaw approvals allowlist add --agent "*" "**"

openclaw approvals allowlist add --agent "main" "**"

Adding "strictInlineEval": false to config (invalid key error)

Question for Developers Is there ANY configuration to disable strictInlineEval? If not, is this a bug or intentional design?

Expected behavior

Expected Behavior With security: full and ask: off, the agent should be able to execute inline Python code without approval prompts or security blocks.

Actual behavior

Actual Behavior Inline Python execution is still blocked by an undocumented strictInlineEval policy.

OpenClaw version

OpenClaw: 2026.4.11 (769908e)

Operating system

OS: Ubuntu on WSL2 (6.6.87.2-microsoft-standard-WSL2)

Install method

Install: npm global

Model

Gemini 2.5 Flash · google

Provider / routing chain

openclaw -> direct -> google/gemini-2.5-flash (default route, no gateway proxy)

Additional provider/model setup details

Default configuration with no custom routing. Model defined in config.yaml under agents.defaults.model.primary: "google/gemini-2.5-flash". No auth profiles or proxies configured.

Logs, screenshots, and evidence

Obfuscated command detected

Impact and severity

Error observed when attempting inline Python:

text Obfuscated command detected Config file after modifications shows:

yaml tools: exec: security: full ask: off Attempted config addition (failed - invalid key):

yaml tools: exec: security: full ask: off strictInlineEval: false # Results in "Unrecognized key" error Approvals configuration:

text Allowlist:

  • local | * | ** | just now
  • local | main | ** | just now

Additional information

NOT_ENOUGH_INFO for regression testing (no prior working version documented). Workaround: None identified. Manual copy-paste of processed data required.

extent analysis

TL;DR

The issue is likely due to the undocumented strictInlineEval policy blocking inline Python execution, and there is no clear configuration to disable it.

Guidance

  • Verify that the tools.exec.security: full and tools.exec.ask: off settings in config.yaml are correctly applied by checking the OpenClaw documentation for any specific requirements or limitations.
  • Attempt to add the strictInlineEval: false configuration key to the config.yaml file, despite the "Unrecognized key" error, to see if it has any effect.
  • Check the OpenClaw approvals configuration to ensure that the allowlist rules are correctly set up to permit inline Python execution.
  • Consider reaching out to the OpenClaw development team or community for further assistance, as the strictInlineEval policy appears to be undocumented.

Notes

The issue lacks information on prior working versions, making it difficult to determine if this is a regression or a new issue. Additionally, the "Unrecognized key" error when attempting to add the strictInlineEval: false configuration key suggests that this may not be a valid solution.

Recommendation

Apply workaround: Manual copy-paste of processed data is currently the only identified workaround, as there is no clear configuration to disable the strictInlineEval policy.

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…

FAQ

Expected behavior

Expected Behavior With security: full and ask: off, the agent should be able to execute inline Python code without approval prompts or security blocks.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING