Back to skill

Security audit

qdrant-db

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent Qdrant knowledge-base purpose, but it can copy local agent memory and knowledge-base content to configured services, including plaintext HTTP endpoints.

Review before installing. Use this only with trusted Qdrant and embedding services, require HTTPS for any non-local endpoint, use narrow revocable API keys, and do not run migrate-sqlite unless you intend to copy OpenClaw memory into Qdrant. Back up important collections and require explicit confirmation before delete or bulk migration operations.

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/kb.py:108
Finding

Remote endpoints can transmit credentials and sensitive knowledge-base content over plaintext HTTP

Content
View full analysis
Any: data = None if body is None else json.dumps(body).encode("utf-8") hdrs = {"Accept": "application/json"} if body is not None: hdrs["Content-Type"] = "application/json" if headers: hdrs.update(headers) req = urllib.request.Request(url, data=data, headers=hdrs, method=method) try: with urllib.request.urlopen(req, timeout=timeout) as resp: raw = resp.read().decode("utf-8", "replace") return json.loads(raw) if raw else {} except urllib.error.HTTPError as err: detail = err.read().decode("utf-8", "replace") raise SystemExit(f"HTTP {err.code} {method} {url}\n{detail}") from err except urllib.error.URLError as err: raise SystemExit(f"URL error {method} {url}: {err}") from err def qdrant_headers(cfg: dict[str, Any]) -> dict[str, str]: h: dict[str, str] = {} if cfg.get("qdrant_api_key"): h["api-key"] = cfg["qdrant_api_key"] return h def embed_texts(cfg: dict[str, Any], texts: list[str]) -> list[list[float]]: missing_embed = [ name for name, val in ( ("EMBEDDING_BASE_URL", cfg.get("embed_base")), ("EMBEDDING_API_KEY", cfg.get("embed_key")), ("EMBEDDING_MODEL", cfg.get("embed_model")), ) if not val ] if missing_embed: raise SystemExit( "Missing embedding config: " + ", ".join(missing_embed) + f". Fill them ...[truncated 3864 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 93)May include surrounding context.

md
# ============================================================
# qdrant-db 配置示例 —— 复制为 .env 后按实际环境填写
#   cp env.example .env && chmod 600 .env
#
# 读取优先级: 真实环境变量 > 本 .env(代码不内置默认值,缺必填项会报错)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 114)May include surrounding context.

md
# ============================================================
# qdrant-db 配置示例 —— 复制为 .env 后按实际环境填写
#   cp env.example .env && chmod 600 .env
#
# 读取优先级: 真实环境变量 > 本 .env(代码不内置默认值,缺必填项会报错)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · env.example (reported line 2)May include surrounding context.

text
# ============================================================
# qdrant-db 配置示例 —— 复制为 .env 后按实际环境填写
#   cp env.example .env && chmod 600 .env
#
# 读取优先级: 真实环境变量 > 本 .env(代码不内置默认值,缺必填项会报错)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · env.example (reported line 3)May include surrounding context.

text
# ============================================================
# qdrant-db 配置示例 —— 复制为 .env 后按实际环境填写
#   cp env.example .env && chmod 600 .env
#
# 读取优先级: 真实环境变量 > 本 .env(代码不内置默认值,缺必填项会报错)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/kb.py (reported line 19)May include surrounding context.

python
# ============================================================
# qdrant-db 配置示例 —— 复制为 .env 后按实际环境填写
#   cp env.example .env && chmod 600 .env
#
# 读取优先级: 真实环境变量 > 本 .env(代码不内置默认值,缺必填项会报错)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/kb.py (reported line 65)May include surrounding context.

python
# ============================================================
# qdrant-db 配置示例 —— 复制为 .env 后按实际环境填写
#   cp env.example .env && chmod 600 .env
#
# 读取优先级: 真实环境变量 > 本 .env(代码不内置默认值,缺必填项会报错)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/kb.py (reported line 20)May include surrounding context.

python
# 配置文件随 skill 走:<skill根>/.env(scripts/ 的上一级),shell 风格 KEY=VALUE
# 代码不内置默认值:配置统一从 真实环境变量 > .env 读取,模板见 env.example
ENV_FILE = Path(__file__).resolve().parent.parent / ".env"


def eprint(*args: Any) -> None:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill instructs use of a local Python helper that reads environment variables, accesses files, and connects to Qdrant/embedding network endpoints, but the skill manifest declares no explicit tool scope or allowed-tools restrictions. That increases attack surface because an agent may invoke broader capabilities than a reviewer or user expects, especially given the documented access to local files, secrets in .env, and network services.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill exposes a delete command for Qdrant points but does not require an explicit confirmation workflow or warn that deletion is destructive. In an agent setting, ambiguous user requests or prompt confusion could cause irreversible loss of indexed knowledge.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 93)May include surrounding context.

统一配置文件 <skill根目录>/.env(与 kb.py 同随 skill 走,权限 600);目录下附脱敏模板 env.example,复制即可开始:

bash
cp env.example .env && chmod 600 .env
bash

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · env.example (reported line 3)May include surrounding context.

text
# ============================================================
# qdrant-db 配置示例 —— 复制为 .env 后按实际环境填写
#   cp env.example .env && chmod 600 .env
#
# 读取优先级: 真实环境变量 > 本 .env(代码不内置默认值,缺必填项会报错)
# 语法: shell 风格 KEY=VALUE

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · env.example (reported line 22)May include surrounding context.

text
# ---------- Embedding 服务 ----------
# OpenAI 兼容的 embeddings 接口地址(必填)
#   例: http://127.0.0.1:8000/v1 或 https://api.openai.com/v1
EMBEDDING_BASE_URL=http://127.0.0.1:8000/v1

# embeddings 接口的 API key(服务无需鉴权可留空)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill is described as a local Qdrant CLI helper, but it sends user-supplied text to an external embedding endpoint via HTTP requests. That creates an undocumented data egress path: queries, documents, and migrated content may be transmitted off-host to a third-party service, which materially expands the trust boundary and can expose sensitive local data.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest scope says the skill searches/manages Qdrant, but the code also migrates data from a local OpenClaw SQLite memory database into Qdrant. This broadens the skill's capability to read unrelated local data stores and replicate their contents, increasing the chance of unintended data exposure or bulk exfiltration when combined with remote Qdrant or embedding endpoints.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code reads a local OpenClaw SQLite memory database from a default path or environment variable, which is outside basic Qdrant search/manage functionality. In this skill context, that is more dangerous because the data store may contain prior agent memory, indexed files, or sensitive content that a user would not expect this skill to access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The instructional comments throughout the file are written entirely in Chinese, which imposes a specific language on users without offering an alternative or opt-in. The file does not document that the skill is intentionally region- or locale-specific, so this appears to violate the language/locale policy criterion.

Content

No source excerpt is available for this finding.