subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
timed_out = False try: proc = subprocess.run( [sys.executable, str(main_script), args.params], capture_output=True, text=True,- Confidence
- 95% confidence
- Finding
- The helper executes a Python script path supplied via `--script`, and `_resolve_script` only checks that the path exists locally. That makes this wrapper a generic local code-execution primitive: if an agent or user can influence `--script`, they can run arbitrary local Python files under the agent's privileges, which exceeds the stated TikTok-tool purpose and can lead to arbitrary command execution, data theft, or system modification.
