T01 · Skill Instruction Hijacking
- Location
scripts/subagent-think-chain.js:7- Finding
Mandatory, Non-Overridable Agent Routing Decision
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a memory and subagent-routing helper, but it also stores raw task content for future prompt injection and exposes broad shell/subagent execution utilities that users should review before installing.
Install only if you intentionally want a Chinese-language OpenClaw memory/routing workflow and are comfortable with local task history being stored and reused. Review or disable bootstrapExtraFiles, clear memory/log files regularly, avoid placing secrets in task descriptions or commands, and remove or restrict subagent-watchdog.js exec mode before using it in a sensitive workspace.
scripts/subagent-think-chain.js:7Mandatory, Non-Overridable Agent Routing Decision
scripts/pre-checkpoint.js:75Persistent Injection of Untrusted Task Content into Future Sessions
scripts/subagent-watchdog.js:49Unrestricted Shell Command Execution with Automatic Retries
scripts/subagent-think-chain.js:21Persistent Logging of Potentially Sensitive Tasks and Commands
The documented behavior includes shell execution, temp file creation, watchdog logging, and spawning subagents via CLI, none of which are clearly conveyed by the high-level description. Undisclosed command execution and agent spawning materially increase attack surface because task content could be transformed into filesystem or process actions users did not expect from a 'brain' skill.
The documented behavior includes shell execution, temp file creation, watchdog logging, and spawning subagents via CLI, none of which are clearly conveyed by the high-level description. Undisclosed command execution and agent spawning materially increase attack surface because task content could be transformed into filesystem or process actions users did not expect from a 'brain' skill.
The documented behavior includes shell execution, temp file creation, watchdog logging, and spawning subagents via CLI, none of which are clearly conveyed by the high-level description. Undisclosed command execution and agent spawning materially increase attack surface because task content could be transformed into filesystem or process actions users did not expect from a 'brain' skill.
The documented behavior includes shell execution, temp file creation, watchdog logging, and spawning subagents via CLI, none of which are clearly conveyed by the high-level description. Undisclosed command execution and agent spawning materially increase attack surface because task content could be transformed into filesystem or process actions users did not expect from a 'brain' skill.
The documented behavior includes shell execution, temp file creation, watchdog logging, and spawning subagents via CLI, none of which are clearly conveyed by the high-level description. Undisclosed command execution and agent spawning materially increase attack surface because task content could be transformed into filesystem or process actions users did not expect from a 'brain' skill.
The file exposes a generic shell execution helper via execWithRetry(cmd, ...) that accepts an arbitrary command string and passes it directly to execSync. In a skill advertised as decision/memory infrastructure, this is a materially broader capability that can enable arbitrary command execution, lateral actions on the host, and chaining with attacker-controlled input if any caller passes untrusted data.
The CLI entrypoint exposes an exec mode that lets users invoke arbitrary shell commands through this skill script, which is unrelated to the stated brain/memory functionality. This turns the skill into a general command runner and increases the attack surface substantially, especially in agent environments where other components may call it programmatically.
The skill advertises and invokes local scripts and bootstrap file injection, but the manifest shown declares no explicit tool scope or permissions. In practice this can cause the agent to read environment/workspace state or invoke capabilities without clear user consent boundaries, which is a security and trust issue even if not overtly malicious.
Advertising automatic capsule suggestions/creation and cross-workspace memory reuse without warning about persistence means users may unknowingly create reusable records of their work. Those records can accumulate sensitive operational details, prompts, or outputs and later be surfaced in unrelated tasks or workspaces.
The install instructions direct automatic startup injection of memory files, while the description does not adequately warn that prior task history and workspace memory may be read and reused. This creates a privacy and prompt-integrity risk because sensitive historical content can silently influence later sessions or be exposed to downstream agents.
This is a manifest file, so vague-trigger checks apply. The description broadly markets the skill as giving an AI agent a brain-like decision architecture, but it does not specify when the skill should be invoked, what trigger phrases apply, or any exclusions, which can lead to unintended activation in generic memory or reasoning contexts.
The natural-language content in the manifest is entirely in Chinese, including the primary description and feature list, with no indication that users can choose another language or that the skill is intended only for a Chinese-language environment. This can violate language/locale policy when a specific language is imposed without opt-in or documented justification.
The script reads files from the user's workspace (~/.openclaw/workspace/memory) and emits their contents as JSON to stdout, including user info, tasks, conclusions, and buffer text, without any consent, minimization, or disclosure mechanism. In an agent skill, stdout is often consumed downstream as prompt context or logs, so this can silently expose sensitive local data beyond the user's immediate awareness.
The script intentionally builds a plain-language session injection string containing user information, active tasks, recent conclusions, and a slice of working-memory contents, then emits it for prompt use. This creates a prompt-context data exposure risk: sensitive memory can be propagated into model context, logs, traces, or downstream tools, increasing the chance of unintended disclosure or prompt-based exfiltration.
This shell script presents its description, usage guidance, and user-facing messages only in Chinese. Because the file does not offer an opt-in language choice or indicate that it is intentionally limited to a Chinese-speaking environment, it creates a natural-language locale policy concern.
The user-facing natural-language content in the header comments and usage instructions is entirely in Chinese, which imposes a specific language on users without any opt-in or alternative. Under the policy, language constraints should either be optional or explicitly justified as region-specific.
Comments and user-facing strings consistently prescribe Chinese-language operation and outputs, such as the usage/help and operational instructions, without any opt-in or configurable locale handling. This can violate language/locale policy when a skill forces a specific language absent user choice or a documented region-specific justification.
The script logs raw task descriptions to a persistent file under the user's home workspace without notice or consent. Because task text may contain secrets, credentials, internal project details, or sensitive prompts, this creates an unnecessary confidentiality risk through local data retention and later exposure to other tools, users, backups, or malware.
The manifest description states '2并发上限', implying at most two concurrent subagents. However, the code explicitly raises agentCount to 3 for certain comparison tasks, which exceeds the advertised concurrency limit and changes the skill's effective behavior.
The script persists the full routing decision object, including the original task and analysis metadata, to a JSON file without explicit warning. This expands the privacy footprint beyond transient processing and can expose sensitive operational context, model-selection logic, and user inputs to unintended readers or later compromise.
The code persists watchdog activity to ~/.openclaw/workspace/memory/watchdog-log.md and writes task JSON files under /tmp before spawning subagents. Persistent filesystem logging and temp-file based task handoff may be implementation choices, but they are additional operational behaviors not conveyed by the manifest’s description of a packaged brain/memory architecture.
The function is documented as "执行命令(超时保护)" and the module header claims "exec超时自动重试", but the catch block determines isTimeout by checking whether the error message contains ENOTEMPTY, which is unrelated to process timeout. This directly undermines the documented intent because the retry/error classification does not actually reflect timeout conditions as described.
The code offers shell command execution without any explicit confirmation, warning, or policy gate, making accidental or indirect execution more likely. In an agent skill context, lack of disclosure and confirmation increases the chance that dangerous commands are triggered through automation rather than deliberate user intent.
The file's descriptive comments and generated session text are entirely in Chinese, which effectively fixes the skill's language/locale behavior without user opt-in. The file does not indicate that this is a justified region-specific tool or provide any mechanism to select another language.
This shell script uses Chinese-only comments, usage text, and status messages, which imposes a specific language on users without any opt-in or indication that the skill is intentionally region-specific. The policy explicitly calls for flagging language or locale constraints when no user choice or justification is provided.
Detected: suspicious.dangerous_exec