Back to skill

Security audit

rag-query

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/query.mjs:31
Finding

OpenAI API Key Disclosed to an Unrelated Third-Party Embedding Endpoint

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

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.

Content

Scanner excerpt · scripts/query.mjs (reported line 31)May include surrounding context.

js
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 ||

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

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.

Content

No source excerpt is available for this finding.