T09 · Insecure Skill Coding Practices
- Location
scripts/youtrack_api.py:26- Finding
Permanent API Token Can Be Sent to an Arbitrary or Plaintext Origin
- Content
View full analysis
Dict[str, Any]: """ Make an authenticated API request. Args: method: HTTP method (GET, POST, PUT, DELETE) endpoint: API endpoint (e.g., '/api/issues') data: Request body for POST/PUT Returns: Parsed JSON response """ url = urljoin(self.base_url, endpoint) req_data = None if data is not None: req_data = json.dumps(data).encode('utf-8') req = urllib.request.Request( url, data=req_data, headers=self.headers, method=method ) ``` ### Technical Analysis The caller supplies `base_url`, but the client does not validate its scheme, hostname, port, or relationship to an approved YouTrack instance. Every request generated by the client automatically receives the permanent bearer token through the shared `Authorization` header. If an `http://` URL is supplied, the token and associated request d ...[truncated 1797 chars]- Remediation
View remediation
