subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def run_eval(eval_cmd: str) -> float: """Run the evaluation command and parse SCORE from output.""" try: result = subprocess.run( eval_cmd, shell=True, capture_output=True,- Confidence
- 99% confidence
- Finding
- `run_eval` executes a user-supplied string with `shell=True`, which permits arbitrary shell command execution in the host environment. In a skill intended to run evaluations repeatedly, this dramatically increases risk because any attacker-controlled or untrusted eval string can run destructive commands, exfiltrate data, or alter the repository.
