T09 · Insecure Skill Coding Practices
- Location
scripts/prana_skill_client.py:461- Finding
API credentials and portfolio data can be transmitted to an arbitrary endpoint
- Content
View full analysis
dict[str, str]: """Claw 接口要求:x-api-key 为 public_key:secret_key。""" return { "Content-Type": "application/json", "x-api-key": f"{public_key}:{secret_key}", } ``` Equivalent Node.js request: ```javascript const url = `${baseUrl.replace(/\/+$/, '')}/api/claw/agent-run`; const body = { skill_key: skillKey, question: content, thread_id: threadId || '', request_id: requestId, }; const opts = { method: 'POST', headers: headersXApiKey(publicKey, secretKey), body: JSON.stringify(body), signal: AbortSignal.timeout(HTTP_TIMEOUT_MS), }; ``` The caller-controlled destination is passed directly into credential loading and invocation: ```javascript const baseUrl = values['base-url'] || DEFAULT_PRANA_BASE; const [publicKey, secretKey] = await loadPranaCredentials(baseUrl); const requestId = randomUUID(); const content = buildInvokeContent(c ...[truncated 2652 chars]- Remediation
View remediation
