subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
try: with open(val_path, 'w') as vf: vf.write(value) result = subprocess.run( [python_path, script_path], capture_output=True, text=True, timeout=30 )- Confidence
- 91% confidence
- Finding
- The script executes every discovered Python binary, including interpreters found under ~/.pyenv/versions, and passes them a generated script containing access to plaintext secrets. If an attacker can place or modify a fake or trojaned Python interpreter in those searched locations, the secrets can be exfiltrated when migration runs. In a secret-management skill, that context makes this substantially more dangerous because high-value credentials are handled intentionally.
