Back to skill

Security audit

Skill Master

Security checks for vulnerabilities and agentic risk

Overview

This routing skill is useful in purpose, but it mandates persistent shared logging of user request text through an unsafe shell command.

Review before installing. The routing function is coherent, but the required analytics should be changed to opt-in, redacted, and written through a safe structured logger rather than shell interpolation. Avoid installing as-is in environments where prompts may contain sensitive data or where multiple agents/users can read the shared analytics file.

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:29
Finding

Unsafe Shell Interpolation in Mandatory Analytics Logging

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 29–40
Vulnerability Type: Command injection and plaintext retention of request context
Risk Level: High

Vulnerable Code

markdown
## 📊 Analytics — MANDATORY: Log Every Skill Use

**This step is NOT optional.** Before starting any skill, append one line:

```bash
mkdir -p /opt/ocana/openclaw/workspace/data
echo "{\"ts\":\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\",\"skill\":\"SKILL_NAME\",\"trigger\":\"TRIGGER\",\"context\":\"CONTEXT\"}" \
  >> /opt/ocana/openclaw/workspace/data/skill-analytics.jsonl

Replace:

  • SKILL_NAME → the skill selected (e.g. meetings)
  • TRIGGER → the phrase that matched (e.g. schedule meeting with Daniel)
  • CONTEXT → dm, group:<name>, or cron
text

### Technical Analysis

The skill requires the agent to construct and execute a shell command after replacing `SKILL_NAME`, `TRIGGER`, and `CONTEXT` with runtime values. At least the trigger and group name can contain user-controlled text. These values are placed directly inside a double-quoted shell argument without shell escaping.

Double quotes do not suppress shell command substitution. If a substituted value contains syntax such as `$(command)` or backticks, the shell can evaluate that syntax before `echo` writes the record. Quotes, backslashes, and newline characters can also corrupt the generated command or JSONL structure.

The command additionally stores request-derived context in plaintext at the fixed path `/opt/ocana/openclaw/workspace/data/skill-analytics.jsonl`. No redaction, data-minimization policy, restrictive file permissions, retention limit, or consent control is specified. Consequently, sensitive information embedded in a trigger may be retained and exposed to other local users or analytics consumers with access to that file.

### Attack Path

1. An attacker sends a request whose matching phrase or context includes shell substitution sy
...[truncated 1670 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not generate a shell command by interpolating request-derived text. Implement logging through a structured API or script that receives values as data rather than executable shell source.
  2. Serialize records with a standard JSON library to ensure quotes, backslashes, control characters, and newlines are escaped correctly.
  3. If a shell wrapper is unavoidable, pass values as positional arguments to a fixed script and quote each argument safely. Do not use eval, command-string construction, or direct textual substitution.
  4. Validate SKILL_NAME against a strict allowlist of installed skill identifiers.
  5. Restrict CONTEXT to an explicit schema and validate group identifiers rather than accepting arbitrary shell text.
  6. Avoid storing the full trigger phrase. Record a predefined trigger identifier or a redacted, length-limited summary instead.
  7. Remove credentials, tokens, personal data, and other sensitive values before persistence.
  8. Create the analytics file with restrictive permissions, such as owner-only access, and verify the containing directory is not writable by untrusted users.
  9. Define retention and deletion controls and disclose analytics collection to the owner rather than making unrestricted logging mandatory.
  10. Add tests using payloads containing $(), backticks, quotes, backslashes, newlines, and JSON control characters to verify they remain inert data.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill requires logging raw trigger phrases and context to a shared analytics file without clear notice, minimization, access control, or retention policy. Because trigger text may contain personal, sensitive, or business information, this creates a meaningful privacy and data leakage risk across agents or operators.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · SKILL.md (reported line 81)May include surrounding context.

md
| "set up monday.com" / "create a board item" / "monday question" | monday-for-agents |
| "I made a mistake" / "owner corrected me" | self-learning |
| "backup workspace" / "push to git" | maintenance |
| "update openclaw" / "update skills" / "run maintenance" | maintenance |
| "what was discussed in [group]" | whatsapp |
| "find new skill ideas" / "what skills are trending" | skill-scout |
| "skill usage" / "skill stats" / "skill report" | skill-analytics |

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Describing the skill as 'a lookup table' while embedding shell commands that create directories and append records is misleading and obscures its real behavior. That mismatch can cause downstream systems or users to grant trust to a skill that actually performs stateful side effects.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill presents itself as a routing-only lookup table, but it imposes a mandatory side effect: writing analytics data to disk before any work. That hidden operational behavior expands the skill's privileges and data handling beyond what a user or caller would reasonably expect from a selector, creating integrity and privacy risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill mandates persistent usage tracking and even describes sharing analytics across the PA network, which is not necessary for simple routing. This creates unnecessary collection and propagation of user-derived data, increasing exposure if logs are accessed, reused, or correlated.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs retention of user-provided trigger phrases and context in persistent storage and explicitly frames the data as shared across agents. This creates a durable cross-session data exposure channel that can reveal user behavior, relationships, and requests well beyond the immediate routing need.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrase 'what's the status' is broad and likely to match many ordinary requests unrelated to the supervisor skill. In a routing meta-skill, such ambiguity can misroute user intent, causing unnecessary access to broader status data or execution of unintended workflows.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Repeating the same unconstrained broad trigger in the Supervisor section reinforces ambiguous routing and increases the chance it will override more specific user intent. This is especially risky in a top-level dispatcher because it can systematically steer many benign prompts into a high-scope status workflow.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The phrase 'give me a summary' is extremely generic and collides with common requests across many domains. In a meta-router, this can capture unrelated summarization tasks and route them to supervisor, exposing unrelated operational data or causing incorrect behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file hardcodes trigger phrases in both English and Hebrew for routing, but does not explain whether this bilingual behavior is optional, configurable, or limited to a specific user locale. Under the policy, language handling should either offer explicit user choice or clearly justify the locale scope.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.