T09 · Insecure Skill Coding Practices
- Location
scripts/query.mjs:31- Finding
OpenAI API Key Disclosed to an Unrelated Third-Party Embedding Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly does what it says, but its default setup can send both user queries and an OpenAI API key to an unrelated external embedding service without clear disclosure.
Review before installing. Use a dedicated embedding credential, explicitly set EMBED_BASE_URL to a trusted provider, avoid relying on OPENAI_API_KEY fallback, and do not submit sensitive internal queries unless the embedding provider and Qdrant endpoint are approved for that data.
scripts/query.mjs:31OpenAI API Key Disclosed to an Unrelated Third-Party Embedding Endpoint
The skill declares that it requires environment variables and, by its purpose, performs network-backed queries against Qdrant, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates a capability transparency gap: an agent or reviewer may not understand that the skill can access sensitive configuration and make outbound requests, increasing the risk of unintended data exposure or misuse.
The usage examples, parameter descriptions, and output description are written in Chinese, which effectively imposes a specific language on users. There is no indication that the skill is region-specific or that users may use another language, so this is a natural-language locale policy concern.
The default configuration points to a public external embedding API, which causes user queries to be transmitted off-host unless the operator overrides the endpoint. In this skill's context, that makes the issue more significant because the tool is specifically designed to process arbitrary knowledge-base queries that may contain sensitive organizational information.
const QDRANT_URL = process.env.QDRANT_URL || "http://127.0.0.1:6333";
const EMBED_BASE_URL =
process.env.EMBED_BASE_URL || "https://api.vectorengine.ai/v1";
const EMBED_API_KEY =
process.env.VECTORENGINE_API_KEY ||
process.env.EMBED_API_KEY ||
The script sends the full user query to an external embedding service to generate vectors, but it does not clearly warn the user that their input may leave the local environment. In a RAG context, queries often contain sensitive internal questions, customer data, or secrets, so silent transmission to a third party creates a real confidentiality and compliance risk.
Natural-language strings in the file, including the header documentation and runtime error messages, are presented only in Chinese. This can violate a language/locale policy when the skill forces a specific language without giving users an explicit choice or documenting a justified locale restriction.