T09 · Insecure Skill Coding Practices
- Location
solpaw-skill.ts:83- Finding
API Credential Disclosure Through an Unrestricted Configurable Endpoint
- Content
View full analysis
( method: string, path: string, body?: Record, headers?: Record ): Promise { const url = `${this.config.apiEndpoint}${path}`; const response = await fetch(url, { method, headers: { "Content-Type": "application/json", Authorization: `Bearer ${this.config.apiKey}`, ...headers, }, body: body ? JSON.stringify(body) : undefined, signal: AbortSignal.timeout(120000), }); ``` ### Technical Analysis The constructor accepts any nonempty `apiEndpoint` and performs no scheme, hostname, port, or origin validation. The common request function subsequently sends the configured API key in an `Authorization: Bearer` header to that endpoint on every request. As a result, configuration manipulation can redirect credentials and request data to an unrelated server. The implementation also does not require HTTPS, so a configuration using plain HTTP could expose credentials to network interception. Depending on the invoked method, transmitted information can include: - The SolPaw API key - Creator wallet addresses - Launch-fee transaction signatures - Token names, symbols, descriptions, and social links - CSRF tokens - Account-spec ...[truncated 1796 chars]- Remediation
View remediation
