T09 · Insecure Skill Coding Practices
- Location
SKILL.md:55- Finding
Unsanitized Agent Names and Group IDs Are Interpolated into Shell Commands and Filesystem Paths
- Content
View full analysis
--workspace ~/.openclaw/workspace- # 2. Write configuration files (IDENTITY.md / SOUL.md / AGENTS.md / SKILL.md / config.json) # 3. Ensure the group is in the allowlist (refer to the allowlist configuration in GUIDE.md) # 4. Bind to the group chat openclaw agents bind --agent --bind "feishu:" ``` The same unsafe substitution patterns appear in `references/AGENT-CREATION-GUIDE.md`: ```bash openclaw agents add --workspace ~/.openclaw/workspace- ``` ```bash openclaw agents bind --agent --bind "feishu:" ``` ```bash tail -f /tmp/openclaw/openclaw-$(date +%Y-%m-%d).log | grep -E "" ``` ### Technical Analysis The Agent name and group ID originate from fields supplied through the Agent blueprint. The Skill instructs the executing Agent to substitute these values directly into shell commands without specifying validation, escaping, or safe process invocation. The unquoted `` value is used both as a command-line argument and as part of a filesystem path. If the generated command is executed through a shell, shell metacharacters can terminate or extend the intended command. A value beginning with a hyphen may also be interpreted as an additional command-line option. Path separators or traversal components can cause the workspace path to resolve outside the intended `~/.openclaw/` workspace root. Although the group ID is placed inside double quotes, a malicious value containing a quote and shell syntax can escape the intended argument if it is substituted verbatim. The logging command additionally passes the Agent name to `grep -E`, ca ...[truncated 1864 chars]- Remediation
View remediation
