T09 · Insecure Skill Coding Practices
- Location
src/api/client.ts:116- Finding
Binance credentials can be transmitted to an arbitrary configured API origin
- Content
View full analysis
{ const configShape = { cdpUrl: env.BINANCE_CDP_URL, apiBaseUrl: env.BINANCE_API_BASE_URL, cookieHeader: env.BINANCE_COOKIE_HEADER, csrfToken: env.BINANCE_CSRF_TOKEN, sessionToken: env.BINANCE_SESSION_TOKEN, userAgent: env.BINANCE_USER_AGENT, referer: env.BINANCE_REFERER, ``` ```ts // src/api/client.ts:116-133 public async request(options: RequestOptions): Promise { const url = `${this.config.apiBaseUrl}${options.path}${buildQueryString(options.query)}`; const hasJsonBody = options.body !== undefined && !options.formData; const headers = new Headers({ Accept: "application/json, text/plain, */*", Cookie: this.config.cookieHeader, Referer: this.config.referer, "User-Agent": this.config.userAgent, ...(hasJsonBody ? { "Content-Type": "application/json" } : {}), ...(this.config.csrfToken ? { "X-CSRF-Token": this.config.csrfToken } : {}), ...(this.config.sessionToken ? { "X-Session-Token": this.config.sessionToken } : {}), ...(options.headers ?? {}) }); ``` ### Technical Analysis The configuration schema accepts any syntactically valid URL for `apiBaseUrl ...[truncated 1679 chars]- Remediation
View remediation
