Tainted flow: 'NOTIFY' from os.environ.get (line 33, credential/environment) → subprocess.run (code execution)
Medium
- Category
- Data Flow
- Content
print("请先安装 notify-hub skill,或设置 NOTIFY_HUB_SCRIPT 环境变量。") sys.exit(1) print(f"推送到: {target}") r = subprocess.run( [sys.executable, NOTIFY, "send", "card", json_path, "--to", target], capture_output=True, text=True, )- Confidence
- 97% confidence
- Finding
- The script executes a Python file whose path is taken from the `NOTIFY_HUB_SCRIPT` environment variable with no trust validation beyond existence. An attacker who can influence the environment can point this variable to an arbitrary local script, causing arbitrary code execution when `--send` is used.
