T09 · Insecure Skill Coding Practices
- Location
scripts/wechat_articles.py:36- Finding
Unrestricted Article URL Fetching Enables Server-Side Request Forgery
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly aligned with reading WeChat articles, but its web and browser fetch paths are too broadly scoped and can write screenshots to arbitrary writable paths.
Review this skill before installing in any environment with access to private networks or important writable files. If used, restrict outbound network access to intended WeChat domains, run it as an unprivileged user in an isolated environment, avoid arbitrary screenshot paths, and pin dependencies before deployment.
scripts/wechat_articles.py:36Unrestricted Article URL Fetching Enables Server-Side Request Forgery
scripts/wechat_articles_playwright.py:12Caller-Controlled Screenshot Path Allows Arbitrary File Overwrite
SKILL.md:20Unpinned Third-Party Packages and Browser Artifacts Create Supply-Chain Exposure
This metadata overclaims capabilities such as keyword search, summary/analysis/translation coverage, and a 'complete tool' scope, while the supplied code context indicates only article extraction from a provided URL and an undeclared screenshot capability. Such overbroad claims can cause the agent to invoke the skill in situations users did not intend, expose extra functionality, and weaken reviewability because the real attack surface is obscured.
This metadata overclaims capabilities such as keyword search, summary/analysis/translation coverage, and a 'complete tool' scope, while the supplied code context indicates only article extraction from a provided URL and an undeclared screenshot capability. Such overbroad claims can cause the agent to invoke the skill in situations users did not intend, expose extra functionality, and weaken reviewability because the real attack surface is obscured.
The trigger rules are unusually broad and explicitly mandate use of this skill for loosely defined WeChat-related requests, even when the user does not clearly ask for WeChat access. In an agent setting, mandatory broad triggers can hijack task routing, cause unnecessary network retrieval of third-party content, and override safer or more appropriate tools, making the skill more dangerous than a narrowly scoped content-reader would be.
The skill declares network-dependent behavior and installation of web-fetching/browser packages, but it does not define any explicit tool scope such as permissions or allowed-tools. In an agent environment, that means the skill can be invoked without a clearly bounded network capability contract, increasing the chance of unintended external requests or policy bypass through implicit network access.
This code file contains natural-language strings exclusively in Chinese in the module docstring and CLI usage/help output. Under the policy, forcing a specific language without offering a user choice or documenting a justified region-specific constraint is a locale-policy violation.
This code navigates to a remote URL with Playwright and may save a full-page screenshot to disk, which are safety-relevant operations involving network access and file writes. While the docstring documents parameters, it does not clearly warn the user that the function will contact an external site and optionally persist page content as an image.
The trigger phrases "微信搜索" and especially "公众号搜索" are broad and can match many ordinary requests, causing this skill to be invoked when the user did not specifically ask for WeChat public-article retrieval. In an agent system, overly generic routing can lead to unintended web access, content fetching, or incorrect tool selection, which increases the chance of privacy issues, irrelevant actions, or downstream misuse.
The module docstring and CLI description are entirely in Chinese, and the script's user-facing messages also assume Chinese as the interaction language. The policy only allows fixed language behavior when the user is given a choice or the locale restriction is clearly documented and justified, which is not present here.
L044 将 HTTP 请求头中的 Accept-Language 强制设置为 "zh-CN,zh;q=0.9",这属于自然语言/区域设置约束。文件中没有提供用户选择语言或区域的机制,也没有说明该限制为何必要,因此构成语言/locale 策略问题。
The module docstrings, function docstrings, exception text, and printed labels are all hard-coded in Chinese, with no indication that language is configurable or intentionally limited to a Chinese-only context. Per the policy, forcing a specific language without user opt-in can be a locale-policy issue.
No suspicious patterns detected.