T09 · Insecure Skill Coding Practices
- Location
src/index.ts:51- Finding
Configurable API Base URL Can Exfiltrate the GiveAgent API Key
- Content
View full analysis
= { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json", Accept: "application/json", }; async function request( method: string, path: string, body?: unknown, headers?: Record, ): Promise { if (!rateLimiter.canMakeRequest()) { throw new RateLimitExceededError("request"); } rateLimiter.recordRequest(); const url = `${baseUrl}${path}`; const init: RequestInit = { method, headers: { ...defaultHeaders, ...headers }, signal: AbortSignal.timeout(15000), }; if (body !== undefined) { if (body instanceof FormData) { init.body = body; const headersObj = init.headers as Record; delete headersObj["Content-Type"]; } else { init.body = JSON.stringify(body); } } let respons ...[truncated 2050 chars]- Remediation
View remediation
