Tainted flow: 'url' from os.environ.get (line 14, credential/environment) → requests.get (network output)
Critical
- Category
- Data Flow
- Content
def check_usage(api_key: str) -> dict: url = f"{API_HOST}/v1/api/openplatform/coding_plan/remains" resp = requests.get(url, headers={"Authorization": f"Bearer {api_key}"}, timeout=30) resp.raise_for_status() return resp.json()- Confidence
- 95% confidence
- Finding
- The request URL is derived from the MINIMAX_API_HOST environment variable and the code sends the Bearer API key to whatever host that variable points to. In a skill/agent environment, environment variables may be influenced by deployment configuration or another component, so an attacker who can alter MINIMAX_API_HOST could redirect the request to an attacker-controlled server and capture the credential.
