Tainted flow: 'gateway_url' from os.environ.get (line 35, credential/environment) → requests.patch (network output)
Critical
- Category
- Data Flow
- Content
headers = {} if token: headers["Authorization"] = f"Bearer {token}" resp = requests.patch(f"{gateway_url}/api/config", headers=headers, json=payload, timeout=5) return resp.ok except Exception:- Confidence
- 94% confidence
- Finding
- The code sends the supplied API key to a URL taken directly from the OPENCLAW_GATEWAY_URL environment variable, with a default of plain HTTP. If that variable is changed by a local attacker, malicious plugin, or unsafe deployment environment, the secret can be exfiltrated to an attacker-controlled endpoint, and HTTP transport also exposes the key to interception on the network path.
