subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
script_path = '/Users/yirongcao/.openclaw/skills/crypto-monitor/scripts/news.js' cmd = ['node', script_path, f'--coin={base_symbol}', f'--lang={lang}', f'--limit={max(20, limit * 4)}'] result = subprocess.run(cmd, capture_output=True, text=True, timeout=30) if result.returncode != 0: return []- Confidence
- 88% confidence
- Finding
- The code executes a local Node.js script from a hard-coded absolute path via subprocess. Although it does not use shell=True, it still delegates trust to an external script outside this file's control, so a modified or malicious script at that path can run arbitrary code with the agent's privileges whenever news is fetched.
