T09 · Insecure Skill Coding Practices
- Location
notify_bot.sh:42- Finding
Telegram Bot Token Exposed in Process Command-Line Arguments
- Content
View full analysis
/cmdline`, another local process with sufficient process-inspection privileges may capture the token. The exposure window is short, but repeated executions or automated monitoring can make exploitation practical. Retrieving a Telegram token from the keychain is necessary for the Skill's declared notification functionality. The keychain access at lines 30–32 is limited to documented Telegram token names and does not, by itself, exceed the required privilege. The vulnerability arises from how the retrieved secret is subsequently passed to `curl`. ### Attack Path 1. A user legitimately invokes `notify_bot.sh`. 2. The script retrieves the selected bot's token from the OpenClaw keychain. 3. The script expands `$TOKEN` into the Telegram API URL used as a `curl` command-line argument. 4. While `curl` is running, a malicious local process repeatedly inspects process argument lists. 5. The malicious process captures a URL containing the Telegram bot token. 6. The attacker reuses the token to authenticate directly to the Telegram Bot API. This attack requires local process-inspection access. It does not provide a remote exploitation path by itself. ### Impact Assessment A captured token allows an attacker to impersonate the affected Telegram bot and invoke Bot API methods a ...[truncated 647 chars]- Remediation
View remediation
