T09 · Insecure Skill Coding Practices
- Location
scripts/ingest.mjs:29- Finding
OpenAI API Credential Disclosed to an Unrelated Default Embedding Provider
- Content
View full analysis
d.embedding); } ``` ### Technical Analysis The embedding service URL and API credential are selected independently. Unless `EMBED_BASE_URL` is explicitly configured, the script sends requests to `https://api.vectorengine.ai/v1`. However, if neither `VECTORENGINE_API_KEY` nor `EMBED_API_KEY` exists, it silently uses `OPENAI_API_KEY`. Consequently, a credential named and ordinarily scoped for OpenAI is placed in an HTTP `Authorization` header and transmitted to the unrelated `api.vectorengine.ai` host. The remote host necessarily receives the bearer credential before it can accept or reject the request. The request body also contains every generated document chunk in the `input` property. Sending document content to an embedding provider is necessary for remote embedding, but using an unrelated default endpoint and silently forwarding another provider's credential is not necessary. The behavior is not fully disclosed ...[truncated 1989 chars]- Remediation
View remediation
