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 script executes a Python file whose path is supplied via the --script argument, with only an existence check in _resolve_script and no restriction that it must belong to the current skill directory or an allowlisted path. In an agent setting, this creates arbitrary code execution if an attacker can influence the script path or trick the agent into invoking a different file.
