T09 · Insecure Skill Coding Practices
Warning
- Location
- aholo_reconstruct.py:32
- Finding
- API Key Transmitted to an Undeclared Beta Gateway## Vulnerability Details **File Location**: `aholo_reconstruct.py`, lines 32–33, 106–107, 205–206, 470–477, 505–512, 528–531, and 577–579 **Vulnerability Type**: Credential disclosure to an unexpected service endpoint **Risk Level**: Medium ### Vulnerable Code ```python SITE_CONFIG = { "base_url": "https://api-beta.aholo3d.com", "token_base_url": "https://api.aholo3d.com", "path_prefix": "/global", "viewer_url_template": "https://studio.aholo3d.com/3dgs-model/{world_id}", "api_keys_url": "https://labs.aholo3d.com/api-keys", "skill_script_path": ".cursor/skills/aholo-3dgs-reconstruction-global/aholo_reconstruct.py", } ``` ```python class AholoClient: BASE_URL = SITE_CONFIG["base_url"] TOKEN_BASE_URL = SITE_CONFIG["token_base_url"] ``` ```python def _auth_headers(self) -> Dict[str, str]: return {"Authorization": self.api_key, "Content-Type": "application/json"} ``` The raw API-key header is subsequently used for authenticated requests to `BASE_URL`, including: ```python resp = self.session.post( url, headers=self._create_task_headers(), json=body, timeout=60, verify=self.verify_ssl ) ``` ```python resp = self.session.get(url, headers=self._auth_headers(), timeout=30, verify=self.verify_ssl) ``` ```python resp = self.session.post( url, headers=self._auth_headers(), json=body, timeout=30, verify=self.verify_ssl ) ``` ### Technical Analysis `SKILL.md` identifies `https://api.aholo3d.com` as the gateway that receives authenticated OpenAPI requests. The implementation instead assigns `https://api-beta.aholo3d.com` to `base_url`. Create, generation, status, poll, and list operations derive their URLs from this value and send the raw `AHOLO_API_KEY` in the `Authorization` header. Although both domains appear to belong to Aholo, the beta endpoint is not disclosed in the declared behavior. Users therefore authorize credential transmission t ...[truncated 1629 chars]
- Remediation
- ## Remediation Suggestions 1. Replace the beta gateway with the documented production endpoint: ```python "base_url": "https://api.aholo3d.com", ``` 2. If the beta endpoint is genuinely required, disclose it explicitly in `SKILL.md` and require an intentional configuration option rather than silently selecting it. 3. Enforce a strict allowlist for every endpoint that receives `AHOLO_API_KEY`. 4. Parse and validate configured URLs before sending credentials, requiring: - HTTPS. - An exact approved hostname. - No user information in the URL. - An approved port. 5. Use separate, scoped credentials for beta and production environments where supported. 6. Avoid logging the `Authorization` header and review beta infrastructure for historical API-key retention. 7. Rotate affected API keys if the beta endpoint was not intended to receive production credentials.
