os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
# 自动打开(macOS) if sys.platform == "darwin": os.system(f'open "{output_file}"') if __name__ == "__main__":- Confidence
- 91% confidence
- Finding
- The script invokes a shell via os.system() to automatically open the generated file on macOS. Although the path is quoted, using shell execution for a non-essential post-processing action increases attack surface and can lead to command injection or unexpected command behavior if file paths contain shell-significant characters; it also causes side effects without explicit user consent.
