T09 · Insecure Skill Coding Practices
- Location
volc_ata.py:43- Finding
Unrestricted API Endpoint Can Expose Credentials and Private Media
- Content
View full analysis
str: """Submit ATA task to API""" url = f"{self.api_base}{self.submit_path}" payload = { "app": { "appid": self.app_id }, "audio": audio_data, "text": text, "format": format, "language": language } headers = { "Authorization": f"Bearer; {self.token}", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) response.raise_for_status() result = response.json() return result.get('id') ``` ```python # volc_ata.py:208-221 def _query_task(self, task_id: str) -> Dict[str, Any]: """Query task status""" url = f"{self.api_base}{self.query_path}" payload = { "id": task_id } headers = { "Authorization": f"Bearer; {self.token}", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) response.raise_for_status() return response.json() ``` ```python # volc_ata.py:277 ...[truncated 3712 chars]- Remediation
View remediation
