subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
for py in candidates: full_path = py if os.path.isabs(py) else py try: r = subprocess.run( [full_path, '-m', 'demucs', '--help'], capture_output=True, text=True, timeout=10 )- Confidence
- 84% confidence
- Finding
- The code probes 'python3' and 'python' from the current PATH and executes them. In environments where an attacker can influence PATH or place a rogue executable earlier in resolution order, this can lead to arbitrary code execution under the skill's privileges.
