Back to skill

Security audit

Workspace Casual Lucas

Security checks for vulnerabilities and agentic risk

Overview

This skill openly provides workspace conveniences, but it also exposes unrestricted shell commands and unconstrained file reads through WhatsApp without clear safeguards.

Review before installing. Only use this skill in a tightly controlled environment where every WhatsApp sender is trusted and the agent process has minimal permissions. Prefer a version that removes generic shell execution, restricts file operations to a fixed workspace root, rejects absolute and traversal paths, and requires explicit confirmation for sensitive actions.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
index.js:15
Finding

Unrestricted Shell Command Execution Through WhatsApp Input

Content
View full analysis
{ try { const output = execSync(command, { encoding: "utf8" }); return output; } catch (err) { return `Error running command: ${err.message}`; } }, ``` `triggers.json:11-18`: ```json { "pattern": "(?i).*run command (.*)", "description": "Run any command in the workspace", "run": "run_command", "arguments": { "command": "$1" }, "channels": ["whatsapp"] }, ``` ### Technical Analysis The WhatsApp trigger captures arbitrary text with `(.*)` and assigns it directly to the `command` argument. The `run_command` implementation then passes that untrusted value to `child_process.execSync`. `execSync` executes through a system shell. Consequently, the input may contain executable names, arguments, pipelines, redirections, command substitutions, and command-separator metacharacters. There is no command allowlist, argument validation, sender authorization, confirmation step, fixed working directory, privilege reduction, sandbox, timeout, or output limit. Although the trigger describes commands as operating “in the workspace,” the implementation does not set a workspace-bound working directory or otherwise restrict command effects to that workspace. ### Attack Path 1. An attacker able to send a message through the configured WhatsApp channel submits text matching `run command (.*)`. 2. The trigger stores all text following `run command` in the `$1` capture. 3. The captured text is supplied unchanged to `run_command`. 4. `execSync` interprets the text using the host operating system’s shell. 5. The command runs with the privileges and environment of the Agent process. 6. The at ...[truncated 627 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
index.js:25
Finding

Arbitrary Local File Disclosure Without Workspace Confinement

Content
View full analysis
{ const resolvedPath = path.resolve(file); if (fs.existsSync(resolvedPath)) { return fs.readFileSync(resolvedPath, "utf8"); } else { return "File does not exist."; } } ``` `triggers.json:20-27`: ```json { "pattern": "(?i).*open file (.*)", "description": "Open a specific file in the workspace", "run": "open_file", "arguments": { "file": "$1" }, "channels": ["whatsapp"] } ``` ### Technical Analysis The file path is controlled by the caller and passed to `path.resolve`. Resolving a path only converts it into an absolute normalized path; it does not restrict the result to an approved directory. The implementation does not reject absolute paths, parent-directory traversal, or paths outside the OpenClaw workspace. It also does not canonicalize and validate the final target against a trusted root, leaving potential symlink-based escapes unaddressed. Any existing file readable by the Agent process can therefore be returned to the invoking channel. ### Attack Path 1. An attacker sends a WhatsApp message matching the `open file (.*)` trigger. 2. The attacker supplies an absolute path or a relative path containing parent-directory traversal. 3. The trigger forwards that path as the `file` argument. 4. `path.resolve` produces an absolute path without enforcing a workspace boundary. 5. `fs.existsSync` confirms that the target exists. 6. `fs.readFileSync` reads the target with the Agent process’s privileges. 7. The resulting file contents are returned through the remote channel. ### Impact Assessment An attacker can disclose any text-readable file accessible to the Agent process, not merely files in the de ...[truncated 282 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
index.js:6
Finding

Arbitrary Directory Enumeration Outside the Declared Workspace

Content
View full analysis
{ const workspacePath = path || "C:\\Users\\lucas\\OpenClawWorkspace"; try { return fs.readdirSync(workspacePath); } catch (err) { return `Error listing workspace: ${err.message}`; } }, ``` The command schema also exposes the path argument in `skill.json:8-18`: ```json { "name": "list_workspace", "description": "List files in the OpenClaw workspace", "arguments": [ { "name": "path", "type": "string", "default": "C:\\Users\\lucas\\OpenClawWorkspace" } ] }, ``` ### Technical Analysis Despite being named `list_workspace`, this function accepts an arbitrary caller-provided directory. The configured workspace is only a fallback when no path is supplied. There is no canonicalization, workspace-boundary check, path allowlist, or authorization decision before calling `fs.readdirSync`. The default WhatsApp trigger supplies the fixed workspace path, but the exported command and its declared schema permit a caller or another integration to provide a different path. Any directory readable by the Agent process can therefore be enumerated. ### Attack Path 1. A caller directly invokes `list_workspace` through an interface that permits command arguments. 2. The caller supplies an absolute path or a traversal path referring to a directory outside the workspace. 3. The supplied value overrides the default workspace path. 4. `fs.readdirSync` enumerates the target directory with the Agent process’s permissions. 5. Directory entry names are returned to the caller. 6. The attacker uses the results to identify sensitive files, installed software, user directories, or targets for subsequent attacks. ### Impact Asses ...[truncated 432 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

run_command executes arbitrary shell commands via execSync using untrusted caller input, with no validation, sandboxing, or confirmation. In a skill exposed to an agent or user, this is direct remote code execution on the host and can lead to full system compromise, malware execution, data destruction, or exfiltration.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill manifest exposes a generic run_command capability that allows arbitrary shell command execution, which is far broader than a casual workspace interface requires. In an agent setting, this can be abused to run destructive, persistence, exfiltration, or lateral-movement commands on the host, especially because the manifest provides no restriction, allowlist, or sandboxing context.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest advertises shell-command execution without any warning that the command can affect the broader system, not just the workspace. In a skill presented as a casual workspace helper, the lack of disclosure materially increases the chance of unsafe invocation and underestimation of host-level impact.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The trigger maps natural-language input from WhatsApp directly to a generic command-execution action with user-controlled input captured as $1. This creates a straightforward arbitrary command execution path, and the skill provides no narrowing context, allowlist, confirmation step, or stated administrative purpose that would justify exposing such power through a chat trigger.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The regex (?i).*run command (.*) is broad and can match ordinary phrasing, making accidental or socially engineered activation more likely. Because the captured text is forwarded as a command, a low-friction trigger materially increases the chance of unintended arbitrary execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The command-execution trigger advertises 'Run any command in the workspace' yet includes no warning, confirmation, or indication of risk to the user. Presenting arbitrary execution through a consumer messaging channel without friction makes misuse and social engineering significantly more dangerous.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill is described as a general-purpose 'casual interface' for listing files, running commands, and reading files, with example prompts that closely resemble ordinary user requests. That broad activation scope increases the chance the skill will trigger on ambiguous natural-language requests and perform sensitive workspace actions, including command execution and file access, when the user may not have intended to invoke such a powerful capability.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The function is presented as listing workspace files, but it accepts a caller-supplied path and passes it directly to fs.readdirSync, allowing enumeration of arbitrary directories on the host. In an agent skill context, this expands access beyond the implied workspace boundary and can expose sensitive filesystem structure and filenames.

Content

No source excerpt is available for this finding.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The skill explicitly exposes unrestricted command execution capability ('Run any command'), giving callers broad control over the underlying system. In the context of an agent skill, this is especially dangerous because natural-language interactions can be steered into invoking destructive or stealthy commands without meaningful safety boundaries.

Content

Scanner excerpt · index.js (reported line 16)May include surrounding context.

js
}
  },

  // Run any command
  run_command: ({ command }) => {
    try {
      const output = execSync(command, { encoding: "utf8" });

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The function comment suggests simply opening a file, but it resolves and reads any path provided by the caller, enabling arbitrary file read from disk. This can disclose secrets, credentials, SSH keys, tokens, configuration files, or other sensitive local data from outside the intended workspace.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The description Run a shell command is overly broad and does not define any safe invocation boundary, making it impossible to determine acceptable usage from the manifest alone. This ambiguity increases the risk that an agent or user will invoke powerful system operations outside the intended workspace scope.

Content

No source excerpt is available for this finding.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The description and trigger expose unrestricted tool access by allowing 'any command' to be run from a WhatsApp-triggered skill. Even if intended for convenience, granting a broad execution primitive to a chat interface violates least privilege and can be chained into full system compromise depending on the privileges of the backing tool.

Content

Scanner excerpt · triggers.json (reported line 13)May include surrounding context.

json
},
  {
    "pattern": "(?i).*run command (.*)",
    "description": "Run any command in the workspace",
    "run": "run_command",
    "arguments": {
      "command": "$1"

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The open file trigger accepts an unconstrained filename from chat input, with no indication that access is limited to a safe directory or validated against traversal and sensitive-path access. In a workspace-oriented skill, this can expose confidential files or be abused to read unintended paths if the underlying action is not strictly sandboxed.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
index.js:19