T09 · Insecure Skill Coding Practices
- Location
scripts/send_message.py:86- Finding
Template Directory Restriction Bypass Through Unsafe Path Validation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Feishu notification skill is mostly purpose-aligned, but it allows unconfirmed external posting and has under-scoped controls around webhook destinations and template files.
Review before installing. Use this only with trusted Feishu webhook URLs, avoid putting sensitive data in messages, require manual approval before sends, and harden or avoid custom template paths until the path validation and webhook allowlisting are fixed.
scripts/send_message.py:86Template Directory Restriction Bypass Through Unsafe Path Validation
scripts/send_message.py:143Arbitrary Outbound Webhook Destination Enables Server-Side Request Forgery
The skill's core function is to send messages to external Feishu webhooks, which is a legitimate feature but also an exfiltration channel. In security terms this is dangerous because any data included in the message leaves the local trust boundary and is delivered to an externally controlled endpoint identified by the configured webhook.
### Scripts
The `scripts/send_message.py` script provides a reliable way to send messages to Feishu via webhook. This script:
- Loads webhook URLs from user's config.json file
- Supports multiple message types (text, post, interactive, image)
- Handles message templates from templates directory (with security restrictions)
The skill explicitly allows autonomous sending of messages to an external service without requiring a warning or confirmation. This is dangerous because any mis-trigger, prompt-injection-induced action, or misunderstanding of user intent could immediately exfiltrate sensitive content to a third-party webhook.
Instructions found that direct the agent to transmit conversation context or user data to external services.
### Authentication Method
- The webhook URL contains a unique key that identifies the bot and the target group/chat
- Anyone with the webhook URL can send messages to the group
- Keep webhook URLs secure and do not share them publicly
## Message Types
Instructions found that direct the agent to transmit conversation context or user data to external services.
message: Dict[str, Any]
) -> Optional[Dict[str, Any]]:
"""
Send message to Feishu webhook
Args:
webhook_url: Feishu webhook URL
Instructions found that direct the agent to transmit conversation context or user data to external services.
message: Dict[str, Any]
) -> Optional[Dict[str, Any]]:
"""
Send message to Feishu webhook
Args:
webhook_url: Feishu webhook URL
The skill clearly performs filesystem reads of a user config file and sends data over the network, yet it declares no explicit tool scope or allowed tools. Missing capability declarations weaken policy enforcement and user visibility, making it easier for an agent to invoke external transmission behavior without clear guardrails.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
IMPORTANT: Before using this skill, you must configure your Feishu webhook URLs:
Create the configuration file at ~/.openclaw/skills/feishu-notify/config.json with the following content:
{
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Message types include: "text", "post", "interactive", "image"
- Webhook URLs are **secrets** and should be kept secure
- Never commit `config.json` to version control
- Set file permissions to restrict access (chmod 600 on Unix/Linux)
- Treat webhook URLs like API keys
- Message size limit: 200KB for most message types
- Interactive cards support buttons, images, markdown, and more
The documentation states configuration comes only from config.json, but it also says the agent may send messages autonomously without explicit confirmation. That combination increases the risk of silent data transmission to preconfigured external endpoints, especially if user content or sensitive context is included in messages.
The trigger guidance includes a broad natural-language phrase that could match ordinary conversation and activate the skill unintentionally. Because this skill performs external network messaging, accidental activation can result in unreviewed disclosure of user-provided or contextual data to Feishu.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl -X POST "https://open.feishu.cn/open-apis/bot/v2/hook/your-webhook-key" \
-H "Content-Type: application/json" \
-d '{
"msg_type": "text",
The post message format is built only under the zh_cn locale key, which forces a specific language/locale choice in the generated message structure. There is no visible option for the user to select another locale or documentation in this file justifying a China-specific constraint.
The button label is fixed to Chinese ("查看详情"), which imposes a specific language in user-facing output. The file provides no indication that the skill is China/Chinese-locale-specific or that users can opt into this language, which matches the locale policy violation criteria.
The card text uses fixed Chinese field labels such as '任务ID', '状态', '负责人', '截止日期', and '描述'. This enforces a specific language in user-facing output without any visible opt-in, fallback, or documentation that the skill is intentionally limited to a Chinese-speaking context.
The template defines post content only under the "zh_cn" locale key, which forces output into a specific language/locale. The file provides no alternative locale, user opt-in, or documented reason that this skill is intentionally region-specific.
The examples require the zh_cn locale key and later instruct users via Chinese-only product labels such as 群机器人 and 自定义机器人. This can be a language/locale policy issue because the document implicitly forces a specific locale experience without stating that the API or workflow is region-specific or offering alternatives.
No suspicious patterns detected.