subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if args: query = ' '.join(args) cmd.extend(["-q", query]) result = subprocess.run(cmd, capture_output=True, text=True, timeout=120) if result.returncode == 0: return result.stdout else:- Confidence
- 94% confidence
- Finding
- This code can execute arbitrary Hermes skills selected by the user via an external subprocess, effectively delegating execution to potentially untrusted skill code. Even though subprocess.run is called safely without a shell, the dangerous behavior is the unrestricted capability to run other skills from within this assistant, which expands the trust boundary and may trigger unintended code execution or sensitive local actions.
