T09 · Insecure Skill Coding Practices
- Location
wechat_push_config.json:3- Finding
Plaintext WeCom Webhook Credential Committed to the Project
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly matches its hot-list automation purpose, but it ships credential-like secrets and an enabled external messaging configuration that users should review before installing.
Before installing, remove and rotate the bundled Weibo cookie and WeCom webhook key, replace the push config with your own disabled-by-default template, pin the installer version, and treat generated HTML reports as untrusted when they include platform-sourced content.
wechat_push_config.json:3Plaintext WeCom Webhook Credential Committed to the Project
fetch_all.py:85Hardcoded Weibo Session Cookie in Source Code
analyzer.py:128Stored HTML and Script Injection in Generated Reports
README.md:19Mutable Latest-Version Package Executed During Documented Installation
The skill markets itself as a hot-list retrieval tool, but also supports outbound WeCom webhook delivery and local push-group management, which are materially different capabilities. Outbound messaging increases risk because collected or derived content can be automatically transmitted to external endpoints, especially when paired with scheduled execution.
The skill markets itself as a hot-list retrieval tool, but also supports outbound WeCom webhook delivery and local push-group management, which are materially different capabilities. Outbound messaging increases risk because collected or derived content can be automatically transmitted to external endpoints, especially when paired with scheduled execution.
The skill markets itself as a hot-list retrieval tool, but also supports outbound WeCom webhook delivery and local push-group management, which are materially different capabilities. Outbound messaging increases risk because collected or derived content can be automatically transmitted to external endpoints, especially when paired with scheduled execution.
The skill markets itself as a hot-list retrieval tool, but also supports outbound WeCom webhook delivery and local push-group management, which are materially different capabilities. Outbound messaging increases risk because collected or derived content can be automatically transmitted to external endpoints, especially when paired with scheduled execution.
The skill markets itself as a hot-list retrieval tool, but also supports outbound WeCom webhook delivery and local push-group management, which are materially different capabilities. Outbound messaging increases risk because collected or derived content can be automatically transmitted to external endpoints, especially when paired with scheduled execution.
The code embeds and transmits a hard-coded Weibo session cookie in outbound requests, which is effectively credential material. This can enable unauthorized use of a specific account/session, create privacy and account-abuse risk, and leak or normalize secret handling inside a reusable skill; in an aggregation utility, this is more dangerous because account-backed access is unnecessary for a broadly distributed public-data fetcher.
os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.
# 设置控制台编码
if sys.platform == 'win32':
os.system('chcp 65001 >nul 2>&1')
sys.stdout.reconfigure(encoding='utf-8')
sys.stderr.reconfigure(encoding='utf-8')
os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.
# 设置控制台编码
if sys.platform == 'win32':
os.system('chcp 65001 >nul 2>&1')
sys.stdout.reconfigure(encoding='utf-8')
sys.stderr.reconfigure(encoding='utf-8')
os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.
# 设置控制台编码
if sys.platform == 'win32':
os.system('chcp 65001 >nul 2>&1')
sys.stdout.reconfigure(encoding='utf-8')
sys.stderr.reconfigure(encoding='utf-8')
os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.
# 设置控制台编码
if sys.platform == 'win32':
os.system('chcp 65001 >nul 2>&1')
sys.stdout.reconfigure(encoding='utf-8')
sys.stderr.reconfigure(encoding='utf-8')
os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.
# 设置控制台编码
if sys.platform == 'win32':
os.system('chcp 65001 >nul 2>&1')
sys.stdout.reconfigure(encoding='utf-8')
sys.stderr.reconfigure(encoding='utf-8')
The code can send arbitrary message content to arbitrary webhook URLs supplied via configuration, creating an unrestricted outbound data-transfer primitive. In the context of a hot-list aggregation skill, this is more dangerous because it is not clearly justified by the advertised functionality and could be abused to exfiltrate data or send unauthorized notifications to attacker-controlled endpoints.
The README instructs users to run npx clawhub@latest install daily-hot-aggregator, which pulls and executes the latest package version at install time rather than a reviewed, pinned release. This creates a supply-chain risk: if the upstream package is compromised or a malicious version is published, users may execute attacker-controlled code simply by following the documentation.
The skill advertises and documents shell execution, network access, and local file read/write behavior, but the manifest does not declare any explicit tool scope or permissions. This creates a transparency and policy-enforcement gap: users and hosting systems cannot reliably constrain what the skill may do, especially given scheduled tasks and outbound webhook features.
The skill documents automatic enterprise WeChat pushing and scheduled collection/analysis, but does not prominently warn that content may be transmitted over the network or sent automatically on a schedule. In a skill context, silent or underexplained automation is dangerous because users may enable recurring tasks that continue exfiltrating content or metadata after initial setup.
Using npx clawhub@latest pulls an unpinned, moving version at install time, which exposes users to supply-chain risk if a future release is compromised or introduces unsafe behavior. Because installation is the trust boundary, version drift can silently change what code is executed on user systems.
The webhook setup instructions tell users how to configure an external WeCom webhook but do not clearly state that reports and derived content will be sent to a third-party service endpoint. This omission can lead to accidental disclosure of sensitive trending selections, internal analysis, or organization-specific reporting content.
This code presents its title, descriptions, CLI help text, and generated HTML entirely in Chinese, including an explicit zh-CN HTML locale later in the file. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified, which is not present here.
The skill's purpose is aggregating and analyzing hot-list data, but on Windows it executes an OS shell command via os.system('chcp 65001 >nul 2>&1'). Spawning a shell is not an obvious requirement for trend analysis or report generation and introduces a capability outside the expected context.
The HTML output sets lang="zh-CN", which enforces a specific locale in generated user-facing content. The file does not provide a way for users to select another language/locale or explain why a China-specific locale is mandatory.
The skill manifest describes a 'one-click' cross-platform hot-ranking aggregator focused on collecting hot lists from B站、抖音、微博、头条. In this file, the documented purpose and implemented logic are instead to generate recommended content titles from preexisting report files, and the supported platforms are bilibili/douyin/weibo/xiaohongshu rather than including 头条.
The module docstring explicitly states '选题推荐工具 v1.0 - 根据热榜推荐自媒体选题', which frames the file as a recommendation generator rather than a hot-list aggregation component. This directly diverges from the manifest's declared intent of fetching and aggregating cross-platform hot rankings.
The HTTP header hard-codes Accept-Language: zh-CN,zh;q=0.9,en;q=0.8, which imposes a specific language/locale preference for all outbound requests. The file does not offer the user any language choice or document this as a justified region-specific constraint.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def fetch_bilibili(self, top: int = 10) -> List[Dict]:
"""获取B站热门"""
try:
url = 'https://api.bilibili.com/x/web-interface/popular?ps=' + str(top)
headers = {**self.headers, 'Referer': 'https://www.bilibili.com/'}
req = urllib.request.Request(url, headers=headers)
with urllib.request.urlopen(req, timeout=10) as resp:
The file's natural-language description and all user-facing strings are fixed in Chinese, with no indication that the user can choose another language or that the tool is intentionally limited to a Chinese-only regional context. This can violate a language/locale policy when users have not opted into that language.
No suspicious patterns detected.