Back to skill

Security audit

Openclaw Agent Runner Site

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed OpenClaw runner-page scaffold with some ordinary caution points around API-key handling and generated file overwrites.

Install only if you want a helper for building an OpenClaw browser runner page. Use a new empty output directory when running the scaffold script, review any generated code before adding real Gateway calls, and avoid saving API keys to localStorage unless you accept the browser-storage risk.

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

Warning
Location
scripts/scaffold_site.sh:12
Finding

Caller-Controlled Output Directory Permits File Clobbering and Symlink-Following Writes

Content
View full analysis
"$OUT/index.html" <<'HTML' ``` The same overwrite pattern is used for the other generated files: ```bash cat > "$OUT/style.css" <<'CSS' ``` ```bash cat > "$OUT/app.js" <<'JS' ``` ### Technical Analysis The script accepts its output directory directly from the first command-line argument and creates it with `mkdir -p`. This permits the destination to be an existing directory. It then uses ordinary shell redirection to create or truncate `index.html`, `style.css`, and `app.js` without checking whether those paths already exist or are symbolic links. Shell redirection follows symbolic links by default. Consequently, if an attacker can influence the output-directory argument or prepare files inside the selected directory, the generated content can overwrite other files accessible to the account running the script. The flaw does not independently elevate privileges. Its practical scope is limited to files writable by the executing user. The consequences become more serious if an agent runs the script with elevated privileges or broad filesystem access. ### Attack Path 1. The attacker identifies or creates a directory that the executing account can access. 2. The attacker creates one of the expected output paths as a symbolic link, for example: ```bash mkdir -p /tmp/runner-output ln -s /path/to/writable/target /tmp/runner-output/index.html ``` 3. The attacker causes the agent or user to execute: ```bash ./scripts/scaffold_site.sh /tmp/runner-output ``` 4. `mkdir -p` accepts the existing directory. 5. The redirection to `/tmp/runner-output/index.html` follows the symbolic link and truncates or replaces the linked target with ...[truncated 894 chars]
Remediation
View remediation
&2 exit 1 fi done ``` 3. Enable shell no-clobber behavior before redirection: ```bash set -o noclobber ``` This protects existing regular files but should be combined with explicit symbolic-link checks. 4. Canonicalize and validate the requested destination against an approved workspace root when the script is invoked by an automated agent. 5. Create generated files in a securely created temporary directory, verify them, and then move the complete directory into a new destination. 6. Run the scaffolder as an unprivileged account with filesystem access restricted to the intended workspace. 7. Clearly document that the output argument must not point to an existing project or sensitive system directory. ]]>
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description mostly matches the general theme of scaffolding a minimal web UI for an agent runner, but it materially overstates implemented functionality. The code only generates a static frontend skeleton and explicitly avoids backend/API behavior. The app.js stub captures config and prints a dry-run message; it does not call any API, create sessions, or stream agent output. Additionally, the description suggests a single-HTML option, while the script creates a three-file static site. There are no suspicious undeclared capabilities beyond file creation, but the primary behavior is a scaffold/stub rather than a functioning agent runner UI as described.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The description lists phrases like 'agent runner' and 'runner site', which may overlap with general requests and are not constrained by environment, product context, or exclusion rules. Although examples are provided, the file does not clearly define when these phrases should not activate the skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The trigger engine says the skill activates whenever the user asks for something matching the description above, with only a broad negative trigger of being outside scope. This leaves activation boundaries ambiguous and could cause unintended invocation beyond the explicit example phrases.

Content

No source excerpt is available for this finding.