os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
# Open on macOS if sys.platform == "darwin": os.system(f'open "{filepath}"') except Exception as e: print(f"Download failed: {e}", file=sys.stderr)- Confidence
- 96% confidence
- Finding
- The code invokes a shell via os.system() using a file path derived from user-controlled input (`--download`). Although the path is quoted, shell metacharacters such as embedded double quotes can still break out of the quoted context and allow command injection on macOS when `open` is executed. In this skill context, users commonly supply output directories, so the attack surface is realistic if untrusted input can reach this argument.
