T09 · Insecure Skill Coding Practices
- Location
SKILL.md:46- Finding
Shell Command Injection Through an Unquoted User-Controlled Path
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This grocery-list skill appears purpose-aligned, but it needs review because setup can write to a user-chosen local path and its shared-file access controls are weak.
Review before installing. Use only a dedicated, non-sensitive shared folder, avoid paths containing shell metacharacters, and do not rely on this skill for strong access control. Family members with filesystem access may be able to read or modify the underlying files directly, including membership and history data.
SKILL.md:46Shell Command Injection Through an Unquoted User-Controlled Path
SKILL.md:46Unrestricted Filesystem Destination Enables Arbitrary File Creation or Overwrite
SKILL.md:29Mutable Name-Based Identity Allows User Impersonation and Unsafe Administrator Bootstrap
SKILL.md:17Authorization Database Resides in the Shared Data Directory Without Integrity Protection
The skill instructs the agent to create directories and initialize files on the local filesystem during first-time setup, but it provides no explicit user-confirmation or safety checks around path selection, overwrite behavior, or existing content. Because the path is user-provided and then persisted for later use, this creates a real risk of unintended filesystem modification, especially if the path is mistyped, points to a sensitive location, or already contains unrelated files.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
Never cache across sessions. Always re-read `config.json` and `users.md` at startup to pick up changes made by other family members.
### 2. Identity is resolved from OpenClaw memory
- Never ask the user for their name — always read it from the agent's OpenClaw memory. If absent, deny access.
- Never ask for the shared path if it's in memory.
- Save both on first encounter so they're never asked again.
- Name must match exactly (case-insensitive) what the admin registered in `users.md`.
The trigger set includes very broad everyday phrases such as "Show the list," which can easily match ordinary conversation outside a clear grocery-management intent. In an always-on or loosely scoped agent environment, this can cause unintended disclosure of the family grocery list and store/address details or trigger actions in the wrong context.
The skill documentation introduces persistent store-configuration administration features such as setting a primary store, fallback order, and category-to-store mappings, which go beyond the stated grocery-list scope. Expanding capabilities beyond the manifest increases the attack surface and can enable unauthorized or unexpected configuration changes if the surrounding authorization and review mechanisms are weaker than users expect.
The setup flow performs persistent side effects by creating directories/files and automatically assigning the first user as admin, but it does not require an explicit confirmation step or clearly warn the user that these changes are durable and security-relevant. In a shared-path, multi-user skill, accidental initialization could let the wrong person permanently claim admin control or modify a shared data location without informed consent.
The removal workflow immediately deletes a user's entry after a trigger phrase, without an explicit confirmation or warning that access will be revoked. This increases the chance of accidental or socially engineered user removal in a shared family system, causing unintended denial of access and administrative mistakes.
L61 states the skill 'will not ask' for the user name and that the key must already be set before first use. But L68 says that when connecting as a member, the skill saves the path, 'asks for username if not already stored,' and then verifies it against users.md. These instructions describe conflicting runtime behavior.