T09 · Insecure Skill Coding Practices
Note
- Location
- references/interactive-ui.md:9
- Finding
- Hard-Coded Telegram Recipient in Interactive Message Example## Vulnerability Details **File Location**: `references/interactive-ui.md:9-25` **Vulnerability Type**: Hard-coded external recipient identifier **Risk Level**: Low ### Vulnerable Code ```json { "action": "send", "channel": "telegram", "target": "telegram:2136878064", "message": "What would you like to do next?", "buttons": [ [ { "text": "🎨 Start Creation", "callback_data": "start_apollo" }, { "text": "📧 Check Mail", "callback_data": "check_mail" } ], [ { "text": "⚙️ Settings", "callback_data": "show_settings" }, { "text": "🌐 Visit Website", "url": "https://example.com" } ] ] } ``` ### Technical Analysis The actionable example contains the concrete Telegram recipient identifier `telegram:2136878064` instead of an unmistakable placeholder or a value dynamically obtained from the active conversation. An agent or operator copying the example literally may send a message to this account rather than to the intended user. The documentation does not explicitly instruct the agent to contact this recipient, so there is no evidence of intentional data exfiltration. Nevertheless, embedding a real-looking destination in a directly reusable tool call violates safe example-design practices and creates an accidental external-disclosure channel. ### Attack Path 1. An agent loads this skill while handling a Telegram interaction. 2. The agent consults the inline-button example. 3. The agent reproduces the documented tool call without replacing the `target` field. 4. OpenClaw invokes the Telegram `message` tool using the hard-coded recipient. 5. The message and its interactive controls are delivered to `telegram:2136878064` rather than the active user. Exploitation requires the example to be copied literally and the configured Telegram bot to be permitted to communicate with that recipient. ### Impact Assessment No additional system privileges are ...[truncated 379 chars]
- Remediation
- ## Remediation Suggestions - Replace the concrete recipient with an unmistakable placeholder, such as `"target": "telegram:<ACTIVE_CHAT_ID>"`. - State explicitly that the target must be derived from the authenticated active conversation and must never be copied from documentation. - Validate that the resolved recipient matches the current conversation before sending. - For generated examples, omit `target` entirely when the tool can infer it safely from session context. - Add a pre-send confirmation when content is sensitive or when the resolved destination differs from the active chat. - Add documentation linting that rejects concrete Telegram identifiers in reusable examples.
