Tainted flow: 'url' from os.getenv (line 90, credential/environment) → requests.post (network output)
- Category
- Data Flow
- Confidence
- 93% confidence
- Finding
The configurable base URL receives both the synthesis text and the Authorization header containing the DashScope API key, without destination or HTTPS validation. If an attacker can influence this configuration, they can redirect credentials and text to their server; an HTTP endpoint also exposes them in transit. The default endpoint is HTTPS, so exploitation requires configuration influence rather than ordinary text input.
- Content
python print(f"正在合成语音(DashScope {model},音色:{voice})...") try: response = requests.post(url, headers=headers, json=body, timeout=120) except Exception as e: raise RuntimeError(f"网络请求失败:{e}")
