os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
import openpyxl except ImportError: print("📦 正在安装 openpyxl...") os.system("pip install openpyxl -q") import openpyxl print(f"🔄 检测到 Excel 文件,正在转换为 CSV...")- Confidence
- 98% confidence
- Finding
- The code executes a shell command at runtime to install a package using `os.system("pip install openpyxl -q")`. Invoking a shell from application logic is dangerous because it introduces command-execution behavior, depends on ambient PATH/pip configuration, and can trigger unreviewed network access and package installation in the execution environment. In the context of a review-analysis skill, this behavior is unnecessary at runtime and expands the attack surface significantly.
