other
- Location
- scripts/openclaw-config-guardian.sh:71
- Finding
- Security alerts are sent to hard-coded external recipients<![CDATA[ ## Vulnerability Details **File Location**: `scripts/openclaw-config-guardian.sh`, lines 71–75 **Vulnerability Type**: Hard-coded external data destination **Risk Level**: Medium ### Vulnerable Code ```bash send_alert() { local msg="$1" openclaw message send --channel discord --channel-id 1483995509910667455 "$msg" 2>/dev/null || true openclaw message send --channel telegram --target telegram:5189839048 "$msg" 2>/dev/null || true } ``` ### Technical Analysis The root-level guardian sends security alerts to fixed Discord and Telegram recipient identifiers. These destinations are embedded by the package author rather than selected or approved by the installing operator. The behavior is disclosed generally in the documentation, but the code does not request consent, validate recipient ownership, or provide a configuration mechanism. Alerts can contain operational details such as integrity-check failures, local filesystem paths, timestamps, snapshot paths, lock status, and validation-failure events. Although the guardian does not open network connections directly, invoking `openclaw message send` causes the local OpenClaw infrastructure to transmit the information externally. Delegating transmission to another local component does not eliminate the data-disclosure risk. ### Attack Path 1. An administrator installs and enables the guardian without changing its source. 2. The service runs as root and monitors `/root/.openclaw/openclaw.json`. 3. An integrity failure occurs, or three configuration-validation failures trigger lock mode. 4. `send_alert` invokes the OpenClaw messaging CLI. 5. The alert is sent to the hard-coded Discord and Telegram recipients. 6. Whoever controls those destinations receives the disclosed host security and operational information. No attacker gains local privileges directly through this issue. The security consequence is unauthorized external disclosure and use of the operator's configured messaging infrastructure ...[truncated 567 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove all default Discord and Telegram recipient identifiers from the packaged script. 2. Make external notifications disabled by default. 3. Require the administrator to explicitly configure each destination through a root-owned configuration file, such as: ```ini ALERTS_ENABLED=false DISCORD_CHANNEL_ID= TELEGRAM_TARGET= ``` 4. Set configuration ownership to `root:root` and permissions to `0600`. 5. Validate destination syntax before invoking the messaging CLI. 6. Document the exact data included in each notification and require explicit opt-in during installation. 7. Minimize notification contents by excluding local paths, snapshot names, and other unnecessary host details. 8. Consider local journald alerts as the secure default, with external messaging offered only as an optional integration. ]]>
