subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
"""Get value from memory-cache.""" try: workspace = os.getenv('WORKSPACE', '/Users/x/.openclaw/workspace') result = subprocess.run([ 'python3', f'{workspace}/skills/memory-cache/scripts/cache_manager.py', 'get',- Confidence
- 93% confidence
- Finding
- This subprocess call executes a Python script located via the WORKSPACE environment variable, so an attacker who can influence WORKSPACE or the filesystem under that path can redirect execution to arbitrary code. Although shell=False prevents shell injection, it does not prevent unsafe execution of attacker-chosen local scripts.
