T09 · Insecure Skill Coding Practices
- Location
random-sticker.sh:18- Finding
jq Expression Injection Through User-Controlled Sticker Tags
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Telegram sticker skill is mostly purpose-aligned, but it needs review because it under-discloses bot-token access and has inconsistent, incomplete documentation.
Review before installing. Only run the import script if you are comfortable with it reading your OpenClaw Telegram bot token and contacting Telegram. Treat sticker tags as trusted input, keep stickers.json free of sensitive conversation text, and expect some advertised features to require manual agent logic or missing files.
random-sticker.sh:18jq Expression Injection Through User-Controlled Sticker Tags
import-sticker-pack.sh:13Telegram Bot Token Exposed in Process Command-Line Arguments
The description presents a broader Telegram sticker assistant with collection, pack import, contextual selection, and message frequency controls. The actual code only performs one narrow subset: auto-tagging entries in a local stickers.json file according to emoji mappings. It does not interact with Telegram, send stickers, import packs, choose stickers based on conversation context, or enforce any messaging limits. Because the implemented behavior is materially narrower and lacks several core declared capabilities, this is a clear description-behavior mismatch.
The declared description promises an active Telegram sticker management and sending capability with smart selection, auto-import, emotion tagging, and rate/frequency controls. The actual code chunk is a local diagnostic/status script. It reads a local JSON file, counts entries, prints a preview and stats, and provides setup instructions if the file is missing or empty. It does not interact with Telegram, send stickers, import packs, choose stickers contextually, or enforce message frequency limits. This is a materially different primary purpose from the declared behavior.
The code only implements one part of the description: importing a sticker pack into a local collection. It fetches a sticker set from Telegram, checks for duplicates, and stores sticker metadata in stickers.json. It does not send stickers, select them contextually, apply emotion-tagging logic, or enforce any frequency/message limits. Additionally, it accesses a Telegram bot token from local config and calls the Telegram API, which is a resource access not reflected in the declared permissions. This is a material mismatch because the declared purpose describes a broader smart sticker agent, while the actual code is just an import utility.
The declared description presents a broader end-to-end Telegram sticker management and sending skill, including collection/import, tagging, contextual choice, and rate limiting. The supplied code chunk is much narrower: it only selects a random sticker from a local JSON dataset based on user-supplied tags and outputs the sticker's file_id. While this partially overlaps with 'select contextually' in a limited tag-filtering sense, the main described capabilities—importing packs, tagging by emotion, sending stickers, and respecting frequency limits—are absent. Therefore the description materially overstates what this code actually does.
Subtle instructions detected that may alter agent decision-making or introduce hidden biases.
## Usage Philosophy
**Use stickers like humans do:**
- Greetings (goodnight/morning) → always prefer sticker over text
- Celebrations, humor, empathy → great use cases
- Technical answers, reports → skip stickers
- Frequency: ~1 per 2-5 messages (track yourself in agent logic)
The manifest says the skill will 'Auto-import packs' and implies automated sticker collection/tagging, but these release notes show auto-collection, tag-based filtering, and integration are still roadmap items. The documented implemented features appear narrower than the manifest's claimed scope, indicating a semantic mismatch between stated skill behavior and actual delivered functionality.
The skill invokes shell scripts and instructs local file modification, but declares no explicit tool scope or permissions. That creates a least-privilege gap: an agent or reviewer cannot reliably tell what capabilities the skill requires, increasing the chance of unintended shell execution or file writes in environments that auto-wire tool access.
The skill proposes storing usage analytics and conversation context in local data without notice, minimization, or retention guidance. That can create privacy and compliance risks because conversational context may include sensitive personal data that is unnecessary for sticker selection and could be exposed through local file access or backups.
Subtle instructions detected that may alter agent decision-making or introduce hidden biases.
## Sticker Usage
When to send:
- Goodnight/morning greetings (always use sticker over text)
- Celebrating success/milestones
- Humorous moments
- Emotional responses (joy, sympathy, encouragement)
The manifest describes collecting and sending Telegram stickers, and importing packs is consistent with contacting Telegram's API. However, this script specifically reads a bot token from ~/.openclaw/openclaw.json, which adds local credential/config access beyond the core sticker-management behavior described in the manifest.
This shell script accesses a credential-like value from ~/.openclaw/openclaw.json and uses it for an external API request. Although the script logs the fetch action later, there is no visible notice that it will read a bot token from local configuration, and no explanatory comment or prompt directed to the user about that sensitive access.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
echo "🔍 Fetching sticker pack: $PACK_NAME"
# Get sticker set from Telegram API
RESPONSE=$(curl -s "https://api.telegram.org/bot$BOT_TOKEN/getStickerSet?name=$PACK_NAME")
# Check if successful
if ! echo "$RESPONSE" | jq -e '.ok' > /dev/null; then
The skill manifest says frequency limits are '2-5 messages', while the release notes state '1 per 5-10 messages'. This is an active contradiction in documentation about a core behavior of the skill, which can mislead users about how often stickers may be sent.
This markdown file explicitly advertises direct sendSticker API calls, which are network actions affecting external messaging state. The release notes and quick test instructions present the behavior without any user-facing warning about sending content to Telegram or the operational/privacy implications.
The markdown explicitly tells the agent or operator to update stickers.json manually to track usage, and later shows a command sequence that rewrites the file. There is no accompanying warning that the skill modifies local state or guidance about backups/integrity of that data file.
No suspicious patterns detected.