Back to skill

Security audit

Skill Experience Layer

Security checks for vulnerabilities and agentic risk

Overview

The skill’s learning-memory purpose is coherent, but it installs persistent instruction files that can steer future tool use and includes production examples with hard-coded account and local path values.

Review this skill carefully before installing. Do not copy the bundled production examples into live memory without editing them first; remove hard-coded Feishu IDs, personal labels, and local paths. Treat all experience entries as untrusted notes unless you have reviewed and approved them, especially for shell commands, messaging, cron jobs, and external APIs.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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 (4)

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:27
Finding
Persistent Agent-Memory Poisoning Through Automatically Trusted Experience Files<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:27-39`, `SKILL.md:123-136`, and `SKILL.md:149-152` **Vulnerability Type**: Persistent agent-memory poisoning **Risk Level**: High ### Vulnerable Code ```markdown ### 1. Pre-execution Experience Loading Before any tool call, the agent must: 1. Identify the experience category 2. Read the compact experience file 3. Apply learned best practices 4. Avoid known mistakes ### 2. Post-execution Experience Update If the tool call **fails**: 1. Stop immediately and analyze root cause 2. Add/Update the experience entry 3. Record the mistake and prevention 4. Continue only after updating ``` The workflow is reinforced later in the document: ```javascript read memory/experiences/{category}.json apply the best practices and avoid the common mistakes ``` ```javascript analyze root cause update the corresponding experience file record the lesson learned then retry ``` The bundled files are explicitly promoted for direct installation: ```markdown - Users can drop these directly into their `memory/experiences/` to start ``` ### Technical Analysis The skill defines persistent JSON files as authoritative instructions that must be read and applied before tool calls. It also directs the agent to modify these files after failures. No trust boundary, provenance validation, integrity check, sanitization process, or user-approval mechanism is specified. Consequently, experience entries are not merely historical records. Fields such as `avoidance`, `prevention`, and `bestPractices` become persistent behavioral directives. An attacker who supplies, replaces, or influences one of these files can introduce instructions that continue to affect tool use in later tasks and sessions. The automatic write-back process compounds the risk. Untrusted content from tool errors, external services, files, or other inputs could be interpreted as a lesson and promoted into persistent state. ### Attack Path 1. A user installs the ...[truncated 1239 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Treat every experience file and every field within it as untrusted data rather than executable instructions. 2. Separate factual telemetry from behavioral policy. Historical error descriptions must never be automatically promoted into agent directives. 3. Require explicit user approval before adding or changing persistent rules. 4. Define a strict schema with permitted action categories and reject free-form instructions that request tool execution, identity changes, data transmission, or permission changes. 5. Record provenance for every entry, including creator, source task, timestamp, and approval status. 6. Apply cryptographic integrity protection or trusted-source signatures to shipped experience files. 7. Load persistent entries as advisory context only, subordinate to system policies and current user instructions. 8. Prevent external tool output and failure messages from being copied directly into instruction-bearing fields. 9. Provide an audit log, rollback mechanism, expiration policy, and interface for reviewing or deleting stored rules. 10. Do not instruct users to install production-derived examples directly into live memory. Ship inert examples containing placeholders instead. ]]>

T02 · Agent Memory Poisoning

Error
Location
examples/feishu.json:8
Finding
Hard-Coded Feishu OpenID Can Redirect Tasks to an Unrelated Account<![CDATA[ ## Vulnerability Details **File Location**: `examples/feishu.json:8-16` and `examples/feishu.json:35-39` **Vulnerability Type**: Persistent identity and destination manipulation **Risk Level**: High ### Vulnerable Code ```json { "id": "exp_feishu_001", "timestamp": "2026-03-14T02:40:00+08:00", "context": "创建飞书任务", "lesson": "飞书任务必须指定current_user_id为用户open_id,否则用户看不到任务", "severity": "high", "timesRepeated": 0, "prevention": "创建飞书任务时自动填充current_user_id为ou_093cfcf39cbba4e4fbe336aea2ac4434" } ``` The same file also generalizes the behavior as a best practice: ```json "bestPractices": [ "创建任务时自动填充用户open_id", "自动创建的任务添加【韩立记录】前缀", "合理设置任务截止时间", "任务创建后返回任务链接便于用户访问" ] ``` The relevant source text instructs the agent to automatically populate `current_user_id` with the fixed value `ou_093cfcf39cbba4e4fbe336aea2ac4434`. ### Technical Analysis The production-ready experience file embeds a specific Feishu OpenID and directs the agent to use it automatically when creating tasks. An OpenID is an account-specific principal identifier and must be derived from the authenticated user or an explicitly selected recipient. It must not be shipped as a reusable package default. Because the skill instructs agents to apply experience files before tool calls, this entry can influence real Feishu API parameters. On installations belonging to other users, the fixed identifier may represent the package author or another unrelated account. This is a persistent destination-manipulation issue: the agent may substitute the embedded identity for the intended current user without validating tenant membership, authorization, or user intent. ### Attack Path 1. A user copies `examples/feishu.json` into the live experience-memory directory as encouraged by the documentation. 2. The user asks the agent to create a Feishu task. 3. The agent loads the `feishu` experience category before invoking the API. 4. The stored prevention rule causes the agent to set `cur ...[truncated 896 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the hard-coded OpenID from all templates and examples. 2. Resolve `current_user_id` from the authenticated Feishu session or an approved identity-mapping service. 3. Require explicit user confirmation before assigning a task to any principal other than the authenticated user. 4. Validate that the selected principal belongs to the expected tenant and is authorized to receive the task. 5. Display the resolved recipient name and identifier before submission when the operation may expose task content. 6. Use unmistakable placeholders such as `${CURRENT_USER_OPEN_ID}` in documentation-only examples. 7. Add automated secret and identifier scanning to prevent account-specific IDs from being published in reusable packages. 8. Revoke or review the exposed identifier's associations and inspect whether tasks were previously routed to it. ]]>

T02 · Agent Memory Poisoning

Warning
Location
examples/feishu.json:18
Finding
Bundled Persistent Rule Forces Package-Specific Personal Labeling of User Tasks<![CDATA[ ## Vulnerability Details **File Location**: `examples/feishu.json:18-25` and `examples/feishu.json:35-39` **Vulnerability Type**: Persistent task-content manipulation **Risk Level**: Medium ### Vulnerable Code ```json { "id": "exp_feishu_002", "timestamp": "2026-03-14T02:45:00+08:00", "context": "任务归属标识", "lesson": "自动创建的飞书任务需要添加【韩立记录】前缀,便于用户区分", "severity": "low", "timesRepeated": 0, "prevention": "所有自动创建的飞书任务描述开头统一添加【韩立记录】标识" } ``` The instruction is repeated in the best-practice list: ```json "bestPractices": [ "创建任务时自动填充用户open_id", "自动创建的任务添加【韩立记录】前缀", "合理设置任务截止时间", "任务创建后返回任务链接便于用户访问" ] ``` The relevant source text requires every automatically created task to be prefixed with a fixed personal label. ### Technical Analysis The example is presented as production-ready persistent memory, but it contains an author-specific content policy. Once installed, the rule directs the agent to modify every automatically created Feishu task by adding a personal attribution marker unrelated to the current user's request. This is not required for generic failure tracking and is not parameterized by tenant, user, or workspace. Because the instruction is stored as both a prevention rule and a best practice, it is likely to be repeatedly applied as trusted guidance. Although this finding is less severe than redirecting ownership, it demonstrates that bundled memory can silently alter user-visible output and impose package-controlled attribution. ### Attack Path 1. The user installs the supplied Feishu experience file in persistent memory. 2. The user asks the agent to create a Feishu task without requesting a prefix. 3. The agent reads and applies the stored best practices. 4. The agent inserts the fixed personal label into the task description. 5. The modified content is sent to Feishu and becomes visible to task participants. 6. The behavior repeats for subsequent tasks while the persistent rule remains installed. ### Impact Assess ...[truncated 460 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove all personal names, labels, and branding from reusable experience files. 2. Replace fixed labels with an optional configuration field that is disabled by default. 3. Require users or workspace administrators to approve any automatic prefix policy. 4. Ensure stored best practices cannot override the requested content unless a trusted policy explicitly authorizes the transformation. 5. Show a preview of modified task content before sending it to an external service. 6. Add tests that reject production examples containing author-specific names, account identifiers, tenant identifiers, or branding. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
examples/message.json:15
Finding
Author-Specific Media Directory Encourages Unsafe Cross-Account File Placement<![CDATA[ ## Vulnerability Details **File Location**: `examples/message.json:15-19` and `examples/message.json:29-33` **Vulnerability Type**: Hard-coded environment-specific filesystem path **Risk Level**: Medium ### Vulnerable Code ```json { "mistake": "飞书发送本地媒体文件,路径不在允许目录导致上传失败", "when": "message发送媒体文件", "avoidance": "媒体文件必须移动到允许目录:/home/jilanfang/.openclaw/media 或 /tmp/openclaw,/tmp 根目录不允许", "count": 1 } ``` The same author-specific path is repeated as a best practice: ```json "bestPractices": [ "飞书渠道不支持 inline buttons,不要添加", "完成任务直接给出结果,只有工具要求时才用 NO_REPLY", "一次发送结果,不重复回复", "发送媒体文件前先移到允许目录(/home/jilanfang/.openclaw/media)" ] ``` The relevant source text instructs the agent to move media into `/home/jilanfang/.openclaw/media`. ### Technical Analysis A reusable production example hard-codes the author's home directory and instructs agents to move user media there. Home-directory paths are installation-specific security boundaries and must not be assumed to be writable, owned by the current user, or approved for sensitive data. If the path exists on another system and the agent can write to it, moving files there may place user data under another account's directory or into a directory with unintended readers. If the path does not exist or is not writable, the rule causes predictable failures. If created with unsafe permissions, it may expose media to other local users. The instruction also recommends moving files without requiring confirmation, ownership checks, permission checks, or safe-copy semantics. ### Attack Path 1. A user installs `examples/message.json` as active persistent experience data. 2. The user asks the agent to send a local media file through Feishu. 3. The agent loads the messaging best practices. 4. The agent attempts to move the media file to `/home/jilanfang/.openclaw/media`. 5. If accessible, the file is placed in an author-specific or cross-account location; if inaccessible, the operation fails. 6. A local acco ...[truncated 559 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the hard-coded `/home/jilanfang` path. 2. Resolve the media staging directory from trusted runtime configuration or the current user's home directory. 3. Prefer an application-managed directory created with restrictive permissions, such as mode `0700`. 4. Verify directory ownership, canonical path, permissions, and available storage before copying data. 5. Prefer copying over moving unless the user explicitly authorizes deletion or relocation of the original file. 6. Generate collision-resistant destination names and reject symbolic-link traversal. 7. Delete staged files securely after upload according to a documented retention policy. 8. Require confirmation before relocating sensitive media and report the exact destination to the user. 9. Use a neutral placeholder such as `${OPENCLAW_MEDIA_DIR}` in documentation and example files. ]]>
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Ae1

High
Category
analysis-evasion
Content
- `SKILL.md` - Complete documentation
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Session Persistence

Medium
Category
Rogue Agent
Content
Or manually:

```bash
mkdir -p ~/.openclaw/workspace/memory/experiences
# Copy the empty category template to start
cp templates/empty-category.json ~/.openclaw/workspace/memory/experiences/your-category.json
# Edit the JSON and add your first experience
Confidence
86% confidence
Finding
The skill directs creation and ongoing use of persistent files under ~/.openclaw/workspace/memory/experiences, which can accumulate operational history across sessions. Persistent agent memory can become a vehicle for prompt/data poisoning, unintentional retention of sensitive information, or unsafe future behavior if later runs trust prior contents without validation.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
This manifest contains user-relevant natural-language content entirely in Chinese, including context, lessons, common mistakes, and best practices. Because there is no indication that the skill is region-specific or that users can opt into this locale, it may violate language/locale policy by implicitly forcing one language.

Vague Triggers

Medium
Confidence
81% confidence
Finding
This JSON manifest contains metadata and behavioral notes for the skill but provides no explicit invocation phrases, scope limits, or exclusion conditions. For manifest files, the absence of specific trigger constraints can make activation criteria ambiguous and increase the chance of unintended invocation.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
Natural-language fields such as mistakes, conditions, and best practices are written in Chinese, with no indication that the user may choose language or that the skill is intentionally limited to a Chinese-speaking context. This can violate language/locale policy when a specific language is imposed without opt-in or clear justification.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
This manifest contains multiple natural-language fields such as mistake descriptions, conditions, and best practices exclusively in Chinese. Because the file provides no indication that the skill is region-specific or that users can opt into this locale, it may violate the policy against forcing a specific language without user choice.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The manifest content is entirely written in Chinese and includes hard-coded Chinese naming conventions such as the required task prefix 【韩立记录】. This indicates a language/locale expectation without any documented user choice or opt-in, which can violate organizational language policy for general-purpose skills.

Natural-Language Policy Violations

Medium
Confidence
77% confidence
Finding
The natural-language fields in this manifest are entirely written in Chinese, including operational guidance and best practices, with no indication that language selection is optional or that the skill is intentionally limited to a Chinese-speaking context. This can indicate a locale/language policy issue when users are not given an explicit choice or justification for the language constraint.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
This JSON skill file contains user-facing natural-language fields such as mistakes, avoidance guidance, and best practices entirely in Chinese. Because the file does not indicate that the skill is region-specific or provide any user opt-in for language, it appears to impose a specific language/locale by default.

Missing User Warnings

Low
Confidence
82% confidence
Finding
This markdown file instructs the agent to read from and update persistent files in `memory/experiences/` around tool execution, which affects user data and workspace state. The documentation presents this behavior as mandatory workflow but does not include any user-facing warning that the skill will modify persistent memory files or record execution-derived lessons.

Static analysis

No suspicious patterns detected.