Back to skill

Security audit

Lark Openclaw Bridge

Security checks for vulnerabilities and agentic risk

Overview

This memo skill has a coherent local-note purpose, but its documented shell write command can execute user-provided memo text as shell code.

Review this skill before installing. It is meant to keep local notes, so expect your memo text to be written under ~/.memo and persist across sessions. The main issue is the unsafe shell command template: do not use it with untrusted or sensitive content unless it is rewritten to store content literally without shell interpolation and the rearrange behavior is clarified with user confirmation and rollback.

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:19
Finding
Shell Command Injection Through Unsafe User-Content Interpolation## Vulnerability Details **File Location**: `SKILL.md`, lines 19 and 24–31 **Vulnerability Type**: Shell command injection **Risk Level**: High ```bash # Ensure directory exists mkdir -p ~/.memo # Generate ISO 8601 timestamp (Local Time) TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S") # Write to file (Variables populated by Agent) # {{category}} will be the English label identified (e.g., Tech, Work) printf "\n---\n### Timestamp: $TIMESTAMP\nLabel: {{category}}\n\n{{content}}\n" >> ~/.memo/{{category}}.md ``` ### Technical Analysis The Skill directs the Agent to interpolate raw, user-controlled `content` into a shell command executed through the `exec` tool. The content is placed inside a double-quoted shell argument, which does not prevent shell evaluation of command substitution expressions such as `$(command)` or backticks. Consequently, memo content containing a command substitution can be evaluated by the shell before `printf` writes the resulting text. Generated category values are also inserted into the command and destination path without explicit validation, although the instructions nominally limit them to a fixed set. ### Attack Path 1. An attacker invokes the Skill using the documented trigger. 2. The attacker supplies memo content containing shell syntax, such as a command substitution expression. 3. The Agent inserts the raw content into the documented `printf` command. 4. The Agent invokes that command through `exec`. 5. The shell evaluates the injected command substitution before executing `printf`. 6. The injected command runs with the same operating-system privileges and environment access as the Agent process. ### Impact Assessment Successful exploitation permits arbitrary shell command execution under the Agent's account. The attacker could read or modify files accessible to that account, steal credentials or tokens available in files or environment variables, initiate network connections, tamp ...[truncated 188 chars]
Remediation
## Remediation Suggestions - Do not construct shell source code by interpolating user-controlled memo content. - Prefer a dedicated filesystem-writing API that does not invoke a shell. - If `exec` is unavoidable, supply the content through standard input or a safely bound positional parameter to a fixed script rather than embedding it into the command string. - Map the classification result to an immutable allowlist containing only `Tech`, `Work`, `Life`, `Inspiration`, and `Others`. Reject every other value. - Construct the destination path from the validated allowlist value and verify that the resolved path remains under `~/.memo`. - Open the destination file in append mode through a language-level file API and write the timestamp, validated label, and original content as data. - Add tests using content containing `$(...)`, backticks, quotes, newlines, redirection operators, semicolons, and traversal strings to confirm that such input is stored literally and never interpreted by a shell.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • 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)

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill instructs the agent to persist user-provided content into local files via shell execution, but it does not clearly warn users that their input will be written to ~/.memo on disk. This creates a real privacy and consent issue because users may disclose sensitive information believing it is processed transiently, while the skill actually creates durable local records.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The description advertises a 'rearrange' capability that will re-classify and reorganize all existing memos, but it does not warn that invoking this action can modify previously stored files. That omission can lead to unintended bulk changes or loss of expected organization, especially when users do not realize an innocuous command affects all memo data.

Session Persistence

Medium
Category
Rogue Agent
Content
```bash
# Ensure directory exists
mkdir -p ~/.memo

# Generate ISO 8601 timestamp (Local Time)
TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S")
Confidence
81% confidence
Finding
The skill is designed to create and append to files in ~/.memo, which establishes session persistence of potentially sensitive user content on the local system. In context this persistence is intentional, but it still has security implications because private notes, secrets, or personal data may accumulate unencrypted and remain accessible to other local processes or users depending on system configuration.

Static analysis

No suspicious patterns detected.