T09 · Insecure Skill Coding Practices
- Location
scripts/raven-transfer.mjs:9- Finding
Unrestricted API Base Override Can Exfiltrate Credentials and Financial Data
- Content
View full analysis
controller.abort(), timeoutMs); try { const response = await fetchImpl(`${API_BASE}${path}`, { method, headers: { Authorization: `Bearer ${getApiKey()}`, "Content-Type": "application/json", }, ...(body ? { body: JSON.stringify(body) } : {}), signal: controller.signal, }); const data = await response.json().catch(() => ({})); ``` The live-contract tests repeat this trust model in `tests/contract-live.test.mjs:6-25`: ```js const apiBase = process.env.RAVEN_API_BASE || "https://integrations.getravenbank.com/v1"; const runLive = process.env.RAVEN_CONTRACT_TESTS === "1"; const apiKey = (() => { try { return resolveApiKey(process.env); } catch { return null; } })(); async function ravenLive(method, path, body) { const response = await fetch(`${apiBase}${path}`, { method, headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json", }, ...(body ? { body: JSON.stringify(body) } : {}), }); const data = await response.json().catch(() => ({})); return { response, d ...[truncated 3148 chars]- Remediation
View remediation
