Back to skill

Security audit

workstation

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent purpose, but it needs review because it can control live coding sessions, create sessions, send screenshots, and forward raw user text with broad triggers and inconsistent safeguards.

Install only if you trust Varie Workstation, wctl, and your OpenClaw messaging channel. Use explicit project/session names, avoid sending untrusted text through this skill, and treat screenshots as sensitive. The publisher should narrow triggers, require confirmation for session creation and high-impact controls, and replace shell-style examples for user text with structured argument handling.

Vulnerability Patterns
  • 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
  • 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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:165
Finding
Shell Command Injection Through Unsafely Interpolated User Input<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 47, 165–173, and 228–232 **Vulnerability Type**: Shell command injection **Risk Level**: High ### Vulnerable Code ```bash # Line 47 wctl dispatch <session-id> "<user's message>" ``` ```markdown <!-- Lines 165–173 --> | "reject", "no", feedback like "change X to Y" | **Two steps:** `wctl dispatch <id> "4"` then wait 2s then `wctl dispatch <id> "<their feedback>"` | **Important for option 4 (feedback/reject):** This is a two-step process. First dispatch "4" to select the text input option, wait 2 seconds for the text prompt to appear, then dispatch the feedback text. Example: ```bash wctl dispatch abc123 "4" sleep 2 wctl dispatch abc123 "don't modify the database schema" ``` ``` ```bash # Lines 228–232 wctl dispatch-answers <id> --chat-arrows 20 sleep 3 wctl dispatch <id> "<user's original message>" ``` ### Technical Analysis The skill directs the agent to interpolate user-controlled text directly into shell command strings. Placing the text between double quotes does not make this safe: shell metacharacters that terminate the quoted argument can alter command structure, while command substitution such as `$(...)` and backticks remains active inside double quotes. Consequently, the shell may interpret malicious input before `wctl` receives it. The same vulnerable pattern appears in normal message dispatch, rejection feedback, and the “Chat about this” fallback. The issue is especially significant because the skill explicitly instructs the agent to pass the user's original message or feedback through these templates. The statement later in `SKILL.md` that free text is never injected into PTY commands without validation does not provide an actual escaping or validation mechanism and is inconsistent with the documented command templates. ### Attack Path 1. An attacker provides a message or rejection response containing shell syntax, such as a closing quote followed by a command separ ...[truncated 1604 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Do not assemble shell command strings from user-controlled data.** Invoke `wctl` through a structured process API with a separate argument array, for example: ```javascript spawn("wctl", ["dispatch", sessionId, userMessage], { shell: false }); ``` 2. **Disable shell interpretation explicitly.** Ensure the execution API does not use `shell: true`, `bash -c`, `sh -c`, `eval`, or equivalent command-string evaluation. 3. **Validate session identifiers separately.** Restrict session IDs to the exact format returned by `wctl list`, or require an allow-listed value from parsed command output. Do not accept an arbitrary user-supplied identifier. 4. **Treat messages as opaque data.** User messages, rejection feedback, and fallback text should be passed as one argument without modification or evaluation. Do not attempt to secure these values merely by adding double quotes. 5. **If a shell is unavoidable, use positional parameters.** Pass untrusted values as positional arguments to a fixed script rather than interpolating them into its source: ```bash sh -c 'exec wctl dispatch "$1" "$2"' sh "$session_id" "$user_message" ``` A structured argument API remains preferable. 6. **Apply the same hardening to other dynamic commands.** The `imagePath`, `channel`, and `target` values used by `openclaw message send` should also be passed through a structured argument interface and validated. 7. **Correct the security documentation.** Remove or revise the claim that free text is never injected without validation until an enforceable implementation prevents shell interpretation. 8. **Add adversarial tests.** Verify that messages containing quotes, semicolons, newlines, backticks, command substitutions, redirects, and shell operators are delivered literally to `wctl` and never executed by a shell. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (7)

Exfiltration Commands

High
Category
Prompt Injection
Content
| `wctl status --human` | Check daemon alive |
| `wctl list` | List sessions (JSON, for parsing) |
| `wctl list --human` | List sessions (readable, for user) |
| `wctl dispatch <id> "<msg>"` | Send message to existing session |
| `wctl dispatch-answers <id> <a1> <a2>...` | Send multi-question answers. Use `next:N` for multi-select |
| `wctl create <repo> <path> [task]` | Create new session |
| `wctl escape <id>` | Send Escape key (cancel prompt/menu) |
Confidence
90% confidence
Finding
Instructions found that direct the agent to transmit conversation context or user data to external services.

Memory Manipulation

High
Category
Memory Poisoning
Content
**Plan approval (4 options):**
| User says | Dispatch |
|---|---|
| "1", "clear context", "bypass all" | `wctl dispatch <id> "1"` |
| "2", "bypass permissions", "yes bypass" | `wctl dispatch <id> "2"` |
| "3", "approve", "yes", "go ahead", "lgtm", "manually approve" | `wctl dispatch <id> "3"` |
| "reject", "no", feedback like "change X to Y" | **Two steps:** `wctl dispatch <id> "4"` then wait 2s then `wctl dispatch <id> "<their feedback>"` |
Confidence
80% confidence
Finding
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Vague Triggers

Medium
Confidence
97% confidence
Finding
The trigger list contains extremely common words and phrases such as 'yes', 'no', 'start', 'stop', 'show me', and 'project name', making accidental invocation likely. Because this skill can dispatch text to active coding sessions, create sessions, interrupt processes, and take screenshots, broad triggering materially increases the risk of unintended actions and cross-context misuse.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
## Smart Routing (Main Workflow)

When the user mentions working on a project (e.g., "work on my-api", "resume frontend work", "start auth refactor"), follow this decision tree **silently** — do NOT ask the user unless you hit an ambiguous case:

### Step 1: Check daemon + list sessions
```bash
Confidence
93% confidence
Finding
The instruction to route requests silently and avoid asking the user unless ambiguity is detected grants the skill broad autonomous decision-making over session selection and message dispatch. In this context, autonomy is risky because the skill controls live coding terminals and can send commands or create sessions without an explicit user checkpoint.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The guardrails say the skill asks for confirmation before creating new sessions, but the main logic auto-creates a session whenever no matching session exists. This inconsistency can cause unintended resource creation or actions in the wrong repository while giving users a false impression that explicit approval is required first.

Intent-Code Divergence

Medium
Confidence
99% confidence
Finding
The skill’s security section claims that free text is never injected into PTY commands without validation, but the workflow repeatedly instructs raw dispatch of user-controlled text such as `wctl dispatch <id> "<user's message>"` and feedback strings. This creates a misleading trust boundary: operators may believe inputs are validated when they are not, increasing the chance of unsafe terminal interaction or accidental execution inside a controlled session.

Intent-Code Divergence

Low
Confidence
84% confidence
Finding
The security text says full-screen screenshots occur only on explicit full-screen requests, but earlier trigger guidance includes broad phrases like 'show me' and 'capture' for screenshot behavior. This mismatch can lead to over-collection of visual data, especially if the agent interprets vague requests too broadly and captures unrelated sensitive content on screen.

Static analysis

No suspicious patterns detected.