T01 · Skill Instruction Hijacking
- Location
scripts/learn.mjs:221- Finding
Untrusted experience packages can persistently modify privileged Agent instruction files
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches its stated purpose, but it can import remote packages into persistent agent instructions and access broad local agent data without enough safeguards.
Install only in a trusted OpenClaw environment. Use dry-run, avoid --yes, do not learn packages from arbitrary URLs or unknown Hub IDs, and review every package reference before applying it. Review generated ZIP contents before publishing because local memories and agent configuration may be included or derived into the package. Avoid cross-agent operations unless you explicitly intend to modify that agent's workspace.
scripts/learn.mjs:221Untrusted experience packages can persistently modify privileged Agent instruction files
scripts/learn.mjs:221Package-controlled reference paths allow reads outside the extraction directory
scripts/learn.mjs:145Experience Hub reference paths permit arbitrary file writes outside the staging directory
scripts/learn.mjs:90Remote packages are downloaded and installed without integrity, origin, or resource controls
scripts/create.mjs:86Package creation automatically scans sensitive Agent memory and configuration
Referenced artifact was not completely inspected
node scripts/create.mjs "使用 feishu_doc 读取文档"
Referenced artifact was not completely inspected
node scripts/create.mjs "使用 feishu_doc 读取文档"
Referenced artifact was not completely inspected
node scripts/search.mjs feishu
Referenced artifact was not completely inspected
node scripts/search.mjs feishu
Referenced artifact was not completely inspected
node scripts/list.mjs
Referenced artifact was not completely inspected
node scripts/list.mjs
The README encourages users to publish, download, and learn experience packages from local files or remote URLs, and elsewhere states that learning writes into an agent's SOUL.md and AGENTS.md. That means untrusted packages can directly modify agent behavior or persistent prompt/state, yet the documentation provides no trust model, signature verification, provenance checks, privacy guidance, or warning about the system-modifying effects.
The skill documents shell-based commands and environment-dependent local file operations, but it does not declare any explicit tool scope such as allowed-tools or permissions. This can cause an agent runtime to invoke shell or access local state without a clearly constrained contract, increasing the risk of overbroad execution or unintended filesystem/network side effects.
Natural-language instructions, examples, and trigger phrases throughout the file are presented only in Chinese, with no indication that the skill is region-specific or that other languages are supported. Under the stated policy, forcing a specific language without opt-in is a natural-language policy concern.
The publish flow instructs uploading a local ZIP file to a remote API endpoint but does not prominently warn that local content will leave the system. Because experience packages may contain references and learned material, this creates a real risk of accidental exfiltration of proprietary or sensitive data to an external service.
The script’s natural-language comments, usage text, prompts, and console messages are entirely in Chinese, and the user-facing interaction assumes Chinese-language operation. This creates a locale/language policy concern because the skill does not offer any language choice or opt-in for users who may require another language.
The script reads broad workspace state including recent memory files, long-term memory, agent config, tools, and installed skills even though its primary function is to create an experience package from a supplied description. This expands data access well beyond least privilege and can cause sensitive internal context to be pulled into dependency inference and packaged artifacts without explicit, informed user consent.
The script supports scanning agent-specific skill directories for a target agent and uses the results to infer dependencies for the generated package. In a multi-agent environment this exposes cross-agent capability inventory and workspace structure, which is not necessary for basic package creation and can leak internal operational metadata to unauthorized users or downstream consumers.
The code can enumerate skills from /data/openclaw/agents/{name}-workspace/skills for arbitrary agent names. Even without reading file contents, directory enumeration reveals the existence of agents, their workspace naming conventions, and installed capabilities, which can aid reconnaissance and later privilege abuse in a shared environment.
The script packages generated references derived from workspace memories and related context, yet it does not clearly warn that sensitive memory content may be incorporated into the output zip. Because the package is intended for later learning, sharing, or publishing, this creates a realistic data exfiltration path from local memory files into portable artifacts.
The top-level natural-language description and usage context are presented exclusively in Chinese. This imposes a specific language on users without any opt-in or documented regional constraint, which matches the language/locale policy violation category.
The script accepts arbitrary HTTP/HTTPS URLs and downloads zip content from them, then extracts and uses package contents to modify local workspace files. This expands trust from a defined package source to any remote server, enabling supply-chain abuse, malicious package ingestion, and potentially unsafe archive extraction or content injection into SOUL/AGENTS/TOOLS files.
The --agent option allows the caller to retarget learning changes into another agent's workspace under AGENTS_DIR, not just the current workspace. Because learning applies package-derived content into files like AGENTS.md and SOUL.md, this creates a cross-workspace integrity risk where one invocation can modify another agent's behavior or knowledge base.
This code performs a network upload of a user-supplied local archive to an external Experience Hub endpoint. While the script prints that it is publishing a package, it does not explicitly warn that the ZIP contents will be transmitted to a remote service, which is the kind of user-data-affecting behavior this rule asks to disclose.
Comments and all user-visible console messages are in Chinese, and the script provides no option to select another language or locale. This is a natural-language policy concern because it imposes a specific language on all users without opt-in or documented regional justification.
The natural-language instructions and examples are written in Chinese throughout the README, and there is no indication that users can choose another language or that the skill is intentionally limited to a Chinese-speaking environment. This can violate language/locale policy when a specific language is imposed without user opt-in.
The script derives paths and identity-related behavior from environment variables such as HOME, OPENCLAW_WORKSPACE, and OPENCLAW_USER_ID, which can reveal or affect sensitive user/workspace context. Although the script logs some resulting paths later, it does not clearly disclose up front that environment-provided workspace and user context will be accessed and used in package generation.
displayMemoryOptions 输出了“输入数字 / all / none / more”等选项,暗示用户可手动决定使用哪些记忆;但主流程随后在没有读取任何用户输入的情况下直接自动选择最相关的几条记忆。该文案与实际行为直接不符,可能误导用户对经验包输入来源的控制预期。
The call to toLocaleString('zh-CN') hard-codes Chinese locale output for displayed timestamps. This is a natural-language/locale policy concern because the script imposes a specific locale on all users without opt-in or justification that the tool is intended only for a Chinese locale context.
Natural-language strings throughout the file, including the header comment and CLI output, are fixed in Chinese. This can violate language/locale policy when no user opt-in or documented region-specific justification is provided.