subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def run_script_with_runtime(runtime_path: str, script_path: str, script_args: list[str]) -> int: completed = subprocess.run([runtime_path, script_path, *script_args]) return completed.returncode- Confidence
- 92% confidence
- Finding
- The helper executes whatever path is supplied in --run-script using a discovered interpreter, with no restriction that the target be part of this skill or a trusted directory. That turns a runtime-check utility into a generic code-execution launcher, which is dangerous in an agent context because user- or workflow-controlled inputs can cause arbitrary local script execution.
