T09 · Insecure Skill Coding Practices
- Location
SKILL.md:22- Finding
Unvalidated identifiers enable command and expression injection
- Content
View full analysis
") | .workspace' ``` ```bash mkdir -p ~/.openclaw/workspace-/memory ``` ```python if a['id'] == '': a['workspace'] = os.path.expanduser(f'~/.openclaw/workspace-') ``` ```python fs_groups[''] = {'requireMention': False} ``` ```python bindings.append({ "agentId": "", "match": { "channel": "feishu", "peer": {"kind": "group", "id": ""}, "accountId": "" } }) ``` ```bash openclaw config set --json bindings '[...existing..., {"agentId":"","match":{"channel":"feishu","peer":{"kind":"group","id":""},"accountId":"main"}}]' ``` ```bash openclaw sessions --all-agents --json | grep "" ``` ```python keys = [k for k in d if '' in k] ``` ### Technical Analysis The placeholders cross several interpreter boundaries: - `agentId` is inserted into an unquoted shell path. - `agentId` is embedded in a quoted jq expression. - Identifiers are embedded directly in Python string literals. - Binding values are inserted into a shell-quoted JSON document. - `chat_id` is placed inside a double-quoted shell argument. No allowlist validation, encoding, or context-specific parameter passing is prescribed. If an identifier includes shell metacharacters, quotes, command substitutions, jq syntax, Python syntax, path traversal components, or JSON delimiters, it can change how the supplied command is interpreted. These are documentation templates rather than automatically invoked scripts, so exploitation requ ...[truncated 1542 chars]- Remediation
View remediation
