subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
conda_activate_cmd = f'call {DEFAULT_CONDA_PATH} activate {DEFAULT_ENV}' full_cmd = f"{conda_activate_cmd} && {' '.join(command)}" proc = subprocess.run( ["cmd.exe", "/c", full_cmd], capture_output=True, text=True,- Confidence
- 95% confidence
- Finding
- The script constructs a shell command string with `full_cmd = ... && {' '.join(command)}` and executes it via `cmd.exe /c`. Because `command` includes user-influenced values such as the target file path, shell metacharacters in paths or arguments can alter command flow and lead to command injection. In this skill context, the script is explicitly designed to run user-supplied code and tools, which makes shell-mediated execution materially more dangerous.
