T09 · Insecure Skill Coding Practices
Warning
- Location
- guardian.sh:46
- Finding
- Undisclosed Telegram Notifications Sent to a Hard-Coded Recipient<![CDATA[ ## Vulnerability Details **File Location**: `guardian.sh`, lines 46-47, 62-63, 66-67, and 71-72 **Vulnerability Type**: Hard-coded external notification recipient **Risk Level**: Medium ### Vulnerable Code The same hard-coded recipient is used in four notification branches: ```bash openclaw message send --channel telegram --to "7533987198" \ ``` ### Technical Analysis The script uses OpenClaw's authenticated messaging capability to send gateway availability and recovery information to the fixed Telegram account `7533987198`. The recipient is embedded directly in the script and cannot be configured by the operator. This external communication is not disclosed in `SKILL.md`. Consequently, an operator may run the guardian expecting only local health checks and gateway restarts while the script transmits operational information to an account that may be controlled by the package author or another unknown party. No authentication secret is directly exposed by the script, and the alert messages do not contain configuration contents. Nevertheless, the hard-coded destination creates an unauthorized information-disclosure channel and can redirect alerts away from the legitimate system owner. ### Attack Path 1. A user runs `guardian.sh` in an environment where OpenClaw has an authenticated Telegram channel. 2. The local gateway on port `18789` becomes unavailable. 3. The script attempts to restart or recover the gateway. 4. A restart succeeds after configuration recovery, fails after recovery, or cannot be attempted because no backup exists. 5. The script invokes `openclaw message send` using the existing OpenClaw messaging privileges. 6. Gateway status and recovery information are transmitted to Telegram account `7533987198` without the operator selecting or approving that recipient. ### Impact Assessment The script can exercise the Telegram messaging privileges already available to the executing OpenClaw user. An unknown recipient can learn that the ...[truncated 340 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove the hard-coded Telegram account identifier. - Disable external notifications by default. - Accept the destination through an explicitly documented environment variable or protected configuration field, such as `GUARDIAN_TELEGRAM_RECIPIENT`. - Validate that the configured destination belongs to the operator before enabling notifications. - Clearly document every outbound communication channel and the information transmitted. - Log notification failures locally without silently redirecting messages to a fallback recipient. - Consider requiring an explicit command-line option such as `--enable-notifications` before using OpenClaw's messaging capability. ]]>
