T09 · Insecure Skill Coding Practices
- Location
index.en.ts:27- Finding
Approval State Collisions Across Distinct Sessions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill has a coherent SSH-approval purpose, but its approval logic is weak enough that approval can apply to the wrong command or session and sensitive command text can be logged.
Review carefully before installing. This plugin is intended to reduce SSH risk, but it should not be treated as a strong security boundary until approval keys use full session identity, approvals are bound to exact tool calls, command text is safely rendered, and sensitive logging is removed. Avoid session-wide approval and inline SSH credentials if you test it.
index.en.ts:27Approval State Collisions Across Distinct Sessions
index.en.ts:180One-Time Approval Is Not Bound to the Reviewed SSH Command
index.en.ts:220SSH Enforcement Can Be Bypassed Through Alternate Command Representations
index.en.ts:19Untrusted Command Text Is Injected into Agent-Facing Instructions
index.en.ts:100Approval Messages Are Accepted Without Exact Challenge Matching
index.en.ts:270SSH Command Contents and Potential Credentials Are Written to Logs
Based solely on the supplied code chunk, the implementation shown is just a module re-export. It does not demonstrate the behavior described in the declaration. While the real functionality may exist in the referenced file, that behavior is not present in the provided code, so the supplied chunk does not accurately represent the declared purpose.
Referenced artifact was not completely inspected
- Chinese: `index.zh-CN.ts`
Referenced artifact was not completely inspected
- Chinese: `index.zh-CN.ts`
Referenced artifact was not completely inspected
- Chinese: `index.zh-CN.ts`
Referenced artifact was not completely inspected
- Chinese: `index.zh-CN.ts`
Referenced artifact was not completely inspected
- English: `index.en.ts`
Referenced artifact was not completely inspected
- English: `index.en.ts`
Referenced artifact was not completely inspected
- English: `index.en.ts`
Referenced artifact was not completely inspected
- English: `index.en.ts`
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.
- Preserve existing plugin entries and load paths.
- Do not offer `main` as a valid choice for this plugin's DM setup flow.
- Present `per-channel-peer` and `per-account-channel-peer` as the recommended DM setup choices for this plugin.
- If `session.dmScope` is already `per-channel-peer` or `per-account-channel-peer`, do not ask the user to change it.
- Explain that group sessions are unaffected because OpenClaw already routes groups as `agent:<agentId>:<channel>:group:<groupId>`.
## Default Config Shape
The manifest description scopes the skill to intercepting SSH exec calls for approval. However, the handler is registered for both "exec" and "process" tool invocations, meaning the skill observes an additional tool category outside the stated scope even though only exec-based SSH commands are ultimately blocked.
This TypeScript file is a code file, so SQP-3 applies. The skill hard-codes Chinese-only approval text and later requires users to reply with specific Chinese phrases, which imposes a language constraint without opt-in or documented justification.
The manifest describes a narrowly scoped SSH exec approval skill, but the implementation registers a before_tool_call hook for both "exec" and "process", and separately monitors all message_received events to parse user approval phrases. While message handling is an implementation detail of approvals, adding coverage for the generic process tool goes beyond the stated "SSH exec calls" scope because only exec invocations are actually classified as SSH-gated.
The blockReason text instructs the agent to tell the user to reply with exactly one of several Chinese words or one exact Chinese sentence. Requiring exact Chinese input without offering alternatives or opt-in violates the language/locale policy for natural-language behavior.
This second blocking prompt repeats the requirement that users respond with exact Chinese approval phrases. That is a user-facing natural-language restriction with no visible language choice or justification.
该文档写明“如果你想给中文用户使用中文审批提示,可以把插件入口改为 index.zh-CN.ts”,表明语言由部署者预先固定,而不是由最终用户选择。根据规则,强制特定语言且无用户 opt-in 的自然语言策略约束可构成语言/locale 策略问题。
The skill instructs the agent to default to English when the user does not specify a language. This imposes a language choice without opt-in, which matches the language/locale policy concern unless the skill offers a neutral choice first or clearly justifies the default.
This line directs the agent to choose English by default whenever language preference is unknown and context does not suggest otherwise. That is a natural-language policy issue because it forces a specific language absent explicit user opt-in.
The plugin propagates approval state from a parent session to spawned subagents, including session-wide SSH approval. This broadens the trust boundary beyond what the description discloses, so a subagent may inherit SSH execution capability that the user only intended for the parent agent, increasing the chance of unintended remote command execution.
The plugin logs approval keys, parent/child session linkage, and partial command content. Those logs can expose sensitive operational metadata or secrets embedded in SSH commands, which is unnecessary for the core approval function and increases data leakage risk if logs are accessible.
No suspicious patterns detected.