T09 · Insecure Skill Coding Practices
- Location
scripts/fetch.sh:19- Finding
Arbitrary Python Code Execution Through Shell-Expanded Heredoc Inputs
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its stated AI news digest purpose, but its fetch script can run crafted code and may expose webhook tokens in logs, so it needs Review before installation.
Install only if you trust the publisher and can harden the script first. At minimum, pass values to Python as arguments or environment data using a quoted heredoc, validate count and RSS URL, avoid logging webhook URL paths or tokens, and use webhooks only for destinations you control.
scripts/fetch.sh:19Arbitrary Python Code Execution Through Shell-Expanded Heredoc Inputs
scripts/fetch.sh:121Webhook Credentials May Be Disclosed Through Console and Log Output
The skill explicitly supports pushing fetched content to multiple webhooks, but the description does not clearly warn that retrieved content may be transmitted to external endpoints. This creates a transparency and data-handling risk because users may invoke the skill for local retrieval without realizing the content could be forwarded outside the system.
The trigger phrases are quite broad and generic for AI/news-related conversation, which increases the chance the skill is invoked unintentionally in contexts where the user did not mean to fetch or distribute content. While this is not directly exploitable like code execution, accidental invocation can lead to unwanted network access or downstream webhook pushes if the skill is wired to auto-send results.
The documented configuration includes external webhook URLs, confirming that the skill can transmit content to third-party services. In this context the transmission is an intended feature, but it still presents a real security concern because webhook destinations are externally controlled and could receive data without sufficient validation, user awareness, or destination restrictions.
# 多个推送渠道,空格分隔。支持:Bark / 企业微信机器人 / 飞书机器人 / 钉钉机器人 / 通用 webhook
export AI_DAILY_WEBHOOKS="https://api.day.app/your-token https://other-webhook"
# 默认获取最新条数
export AI_DAILY_DEFAULT_COUNT=1
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# AI Daily 配置
# 多个推送渠道,空格分隔
# export AI_DAILY_WEBHOOKS="https://api.day.app/your-token https://other-webhook"
# 默认获取最新条数(通常 1 条就是今日日报)
# export AI_DAILY_DEFAULT_COUNT=1
The script header claims it only fetches RSS content, but later code also transmits the fetched content to arbitrary webhook URLs from the environment. This creates a transparency and trust problem: operators may run the script expecting local output only, while it can exfiltrate content to external services without clear disclosure.
The script sends fetched content to externally configured webhooks with no user-facing warning, confirmation, or dry-run mode. In an agent skill context, silent outbound transmission increases the risk of unintended data disclosure or misuse of trusted automation to post content to third-party endpoints.
Comments and printed output strings are consistently in Chinese, including status messages and generated report titles, which effectively fixes the user experience to a specific language. The file does not offer user opt-in for language selection or explain that the skill is intentionally limited to a Chinese-speaking context.