os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
print(f"Saved to: {filepath}") if sys.platform == "darwin": os.system(f'open "{filepath}"') except Exception as e: print(f"Download failed: {e}", file=sys.stderr)- Confidence
- 91% confidence
- Finding
- The script invokes a shell via os.system() to open the downloaded file on macOS. Although the filepath is locally constructed, shell invocation is unnecessary and can become dangerous if path content ever includes shell-significant characters or if surrounding assumptions change; in an agent/skill context, auto-opening downloaded remote content also increases risk by triggering local handlers on untrusted files.
