subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
import subprocess env = {**os.environ, 'EM_API_KEY': em_api_key} # 分两次查询:先获取最新价,再获取涨跌幅 result = subprocess.run( ['python3', '/root/.openclaw/workspace/skills/mx-finance-data/scripts/get_data.py', '--query', f'{code}.HK 最新价'], capture_output=True,- Confidence
- 86% confidence
- Finding
- The script launches another skill's Python script with user-influenced input (`code`) and inherited environment variables. Although `subprocess.run` is used without a shell and input is regex-restricted, this still expands the trust boundary to an external script outside this skill, so any unsafe behavior in that downstream script could be triggered through this skill.
