Skip to content

fix: replace shell=True with shell=False in subprocess.run#2114

Open
Jah-yee wants to merge 2 commits intoTEN-framework:mainfrom
Jah-yee:fix/security-subprocess-shell-2107
Open

fix: replace shell=True with shell=False in subprocess.run#2114
Jah-yee wants to merge 2 commits intoTEN-framework:mainfrom
Jah-yee:fix/security-subprocess-shell-2107

Conversation

@Jah-yee
Copy link

@Jah-yee Jah-yee commented Mar 18, 2026

Summary

Security fix for issues #2107 and #2106

Replaces dangerous shell=True in subprocess.run with shell=False + shlex.split() to prevent shell injection vulnerabilities.

Changes

  • Use shlex.split() to safely parse command string into list
  • Pass shell=False to prevent shell injection

This follows security best practices for subprocess execution.

OpenClaw Bot and others added 2 commits March 18, 2026 04:02
- Consistent timestamp format %Y-%m-%d %H:%M:%S.%f (with milliseconds)
- Fixed 3 files: xfyun_asr_python, xfyun_asr_bigmodel_python, xfyun_asr_dialect_python
- Resolves issue TEN-framework#2082
Security fix for issues TEN-framework#2107 and TEN-framework#2106
- Use shlex.split() to safely parse command string
- Pass shell=False to prevent shell injection vulnerabilities
Jah-yee pushed a commit to Jah-yee/ten-framework that referenced this pull request Mar 18, 2026
…njection

Replaces dangerous shell=True in subprocess.run with shell=False +
shlex.split() to prevent shell injection vulnerabilities in 5 files:
- ai_agents/agents/examples/voice-assistant-nodejs/.../run_script.py
- packages/core_apps/default_app_cpp/tools/run_script.py
- packages/core_extensions/default_extension_cpp/tools/run_script.py
- packages/core_extensions/default_extension_nodejs/tools/run_script.py
- packages/example_apps/transcriber_demo/.../run_script.py

Fixes issues TEN-framework#2107, TEN-framework#2106, TEN-framework#2111, TEN-framework#2113, TEN-framework#2114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant