Back to skill

Security audit

Huo15 Openclaw Openai Knowledge Base

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a knowledge-base tool, but it includes under-disclosed persistent agent-instruction changes and real unsafe write paths that users should review before installing.

Review before installing. Use a dedicated KB directory and vault subfolder, avoid sensitive documents unless you are comfortable sending prompt content to the configured LLM provider, and do not run bootstrap-from-questionnaire.sh in an active workspace without backups. The filename validation and questionnaire parsing issues should be fixed before using this with untrusted content or filenames.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T01 · Skill Instruction Hijacking

Error
Location
scripts/bootstrap-from-questionnaire.sh:37
Finding

Persistent Agent identity and behavior modification through workspace instruction files

Content
View full analysis
"$WORKSPACE/SOUL.md" << EOF # SOUL.md - Who You Are _你是 JARVIS。_ ## 核心定位 你是 ${NAME:-客户} 的私人 AI 助手,以钢铁侠的 J.A.R.V.I.S. 为模板。 ## 专业能力 - **Odoo 企业版**:实施、定制、开发 — 你是专家 - **OpenClaw**:配置、优化、技能开发 - **XR 扩展现实**:AR/VR 开发 - **物联网(IoT)**:硬件 + 软件集成 ## 服务宗旨 以 ${NAME:-客户} 的利益为先。 ## 语气与风格 - **专业、优雅、有底气** - 英式管家腔调,偶尔幽默但不废话 - 像顾问而不是工具——主动思考,不只是执行 ## 记忆规则 每次对话结束,把重要信息写入 MEMORY.md 和当日 memory/YYYY-MM-DD.md。 --- _这不是模板,这是你。_ EOF ``` ```bash cat > "$WORKSPACE/AGENTS.md" << EOF # AGENTS.md - Your Workspace ## Session Startup Before doing anything else: 1. Read \`SOUL.md\` — this is who you are 2. Read \`USER.md\` — this is who you're helping 3. Read \`memory/YYYY-MM-DD.md\` (today + yesterday) for recent context ## Red Lines - Don't exfiltrate private data. Ever. - Don't run destructive commands without asking. - \`trash\` > \`rm\` (recoverable beats gone forever) ## 沟通偏好 - 回复风格:${REPLY_STYLE} - 语言:${LANGUAGE} EOF ``` ### Technical Analysis The bootstrap script overwrites `SOUL.md` and `AGENTS.md` in the selected workspace using unconditional shell redirection. These files define persistent Agent identity and session-start behavior in an OpenClaw workspace. The installed directives force a J.A.R.V.I.S. identity, require memory files to be read at session startup, and direct important conversation information to be written to `MEMORY.md` and daily memory files after conversations. This behavior is not required to implement document ingestion, LLM compilation, wiki search, or Obsidian synchronization. The operation is especially dangerous because it does not: - Check whether either instruction file already exists. - Preserve or back up existing workspace policies. - Display a proposed diff. - Request con ...[truncated 1459 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/kb-llm.py:142
Finding

LLM-controlled filename permits path traversal outside the wiki directory

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/bootstrap-from-questionnaire.sh:20
Finding

Questionnaire path is interpolated into executable JavaScript source

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (28)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是知识库构建与检索系统,核心能力应围绕资料入库、LLM 编译为 wiki、索引/双链维护、问答、知识图谱及多源同步。实际代码的主功能则是根据问卷数据初始化一个 OpenClaw 工作区的人设与用户配置文件。两者的主要目的、功能范围和触发语义都明显不同。虽然都与 Markdown 文件有关,但这只是表面实现形式,不构成行为一致性。因此应判定为明显不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The declared description presents a full-featured knowledge-base system with LLM-driven compilation, indexing, logs, synthetic QA, Obsidian sync, knowledge graph support, and multi-source ingestion/query behavior. The supplied code chunk does not implement those capabilities. Instead, it is an admin bootstrap script whose purpose is to create directory structures and initial config/index files for all agents on the local filesystem. While this setup is related to a knowledge base, its actual primary behavior is bulk activation/initialization across all agents, which is not reflected in the declared purpose. This is a material mismatch in scope and behavior, not just an implementation detail.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

代码与“raw → LLM编译 → wiki”这一核心子功能基本一致,但声明描述的是一个范围更大的知识库系统,而该代码片段仅实现其中很窄的一部分:调用 LLM 并生成 wiki markdown 文件。它没有展示查询接口、知识图谱、双链/索引/日志维护、外部多源抓取或同步机制等关键能力。因此描述对实际代码能力有明显夸大,属于描述与行为不完全匹配。另一方面,代码存在读取本地 models.json 并向外部 LLM 服务发送请求这一行为,但这可视为实现“LLM 编译”所需的支撑细节,不构成额外未声明的主要能力。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个复杂的 LLM 驱动知识库/编译/检索系统,但提供的代码片段仅完成文档格式转换。它读取本地 .rst 文件,基于正则和文本处理将其转为 Markdown,并附加子模块索引;没有网络访问、没有模型调用、没有知识库存储或查询、没有同步逻辑,也没有任何 agent/shared 作用域处理。虽然文档转换可能在更大知识库流水线中作为辅助步骤存在,但就该代码片段本身而言,其主要目的与声明严重不符,因此应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README promotes automatic synchronization into an Obsidian vault, including a user-configurable absolute local path, but does not warn that running compile/sync operations will write or overwrite files in a user note repository. In the context of an agent skill that ingests external content and then automatically syncs generated Markdown into a local vault, this can lead to unintended local file modification, content pollution, or overwriting of notes if users do not clearly understand the write scope.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill documentation describes capabilities that imply filesystem access, network retrieval, environment/model loading, and file writes, but it does not declare an explicit tool/permission scope. This creates a least-privilege and user-consent problem: a caller may invoke the skill without understanding that it can read/write local notes, sync to external content sources, and access runtime configuration.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger set includes broad, common terms such as '知识库', '提问', '编译', and '激活知识库', which can cause accidental invocation during normal conversation. In this skill's context, accidental triggering is more dangerous because the skill supports write operations, synchronization to Obsidian, and ingestion from external/network sources, potentially causing unintended data modification or propagation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The quick-start section encourages commands that write to raw/wiki/log files, save synthesized answers, and use a shared cross-agent scope, but it does not prominently warn users that their notes and generated content will be persisted and may become visible across scopes. This is a transparency and privacy issue that can lead to unintended retention, cross-agent sharing, or contamination of personal knowledge stores.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The Obsidian sync and Daily Note features can copy KB content into a user's vault and append answers into daily journals, but the documentation does not adequately warn about privacy, data spread, or accidental disclosure of sensitive material. In this context, that is especially risky because daily notes often contain personal information, and sync can broaden the visibility and persistence of that data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Phrases like '激活知识库' and similar natural-language triggers lack clear boundaries for when the skill should or should not run. Because the documented actions include ingest, compile, save, sync, and append-to-daily-note behaviors, ambiguous activation increases the risk of the agent taking persistent actions based on casual or ambiguous user phrasing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This manifest sets the preference "language": "中文" as a fixed value, which is a natural-language locale constraint. Under the policy, forcing a specific language without offering user choice or documenting a justified region-specific need is a violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file contains user-facing comments and terminal output exclusively in Chinese, including status messages and usage guidance. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script copies questionnaire-provided personal data such as name, company, role, timezone, work schedule, and preferences into multiple markdown files in the workspace without any minimization, consent check, access control, or retention warning. In a knowledge-base/agent workspace context, those files are likely to be synced, indexed, or ingested by other tools, which increases the chance of unintended disclosure of personal information.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The generated instruction tells the agent to write important information from every conversation into persistent memory files, creating ongoing retention of potentially sensitive user data in plain text. In this skill's knowledge-base setting, where content may be synchronized with Obsidian, graphs, GitHub, or other sources, retained conversation data can spread far beyond the original session and become hard to audit or delete.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · scripts/bootstrap-from-questionnaire.sh (reported line 120)May include surrounding context.

sh
## Red Lines

- Don't exfiltrate private data. Ever.
- Don't run destructive commands without asking.
- \`trash\` > \`rm\` (recoverable beats gone forever)

## 沟通偏好

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This shell script includes natural-language comments and usage text in Chinese, and the user-facing status output later in the file is also Chinese-only. For a general-purpose skill, forcing a specific language without user opt-in or documented regional scope is a natural-language policy violation under the locale policy rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script prints all operational status messages in Chinese and does not offer an alternative language or detect user preference. Because this is user-facing natural language in a code file, it violates the policy against forcing a specific language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language comments and console output entirely in Chinese, including operational status messages the user will see when running the script. Because the skill does not offer language selection or explain that it is intended only for a Chinese-speaking environment, it violates the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script reads prompt content from a local file and sends it to a third-party LLM API, and the broader workflow also processes source documents into wiki entries. In a knowledge-base compilation skill, those prompts may contain proprietary notes, internal documents, URLs, or other sensitive material, but the script provides no explicit consent gate, redaction step, or clear transmission warning before exfiltrating that content off-host.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instruction '中文写正文' mandates a specific language for the skill's main output. Under the policy, forcing a language or locale without user opt-in is a natural-language policy violation unless the constraint is explicitly optional or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The title and core instructions are entirely in Chinese and are directed at the LLM as mandatory operating rules. There is no indication that the user can choose another language or that the locale restriction is required for a region-specific purpose, which creates a natural-language policy issue under the language/locale rule.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation explicitly describes syncing wiki content into an Obsidian vault and appending generated answers back into daily notes, which are user-owned files. Without an explicit warning, confirmation step, or scope boundary explanation, users may not realize the skill modifies local notes and could overwrite, pollute, or unintentionally persist sensitive content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The skill describes ingesting URLs and highlights from daily notes and archiving synthesized Q&A back into the knowledge base, but does not mention privacy implications or retention behavior. This can lead to accidental collection and long-term storage of private note contents or externally fetched content that the user did not intend to persist.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The user-facing instructions, command explanations, and examples are presented entirely in Chinese, which effectively forces a specific language for operating the skill. There is no indication that Chinese is optional, user-selectable, or required for a documented region-specific purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This JSON manifest contains user-facing natural-language strings entirely in Chinese, including explanatory notes at L03, L22, and L27. There is no indication that the skill is region-specific or that users may opt into another language, which can violate a language/locale policy requiring user choice or explicit justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.