T09 · Insecure Skill Coding Practices
- Location
scripts/search-mgtv.js:202- Finding
Windows Command Injection Through Unvalidated Direct URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its MGTV search purpose, but it exposes an unsafe user-supplied URL browser launch path that can go beyond MGTV and may be risky on Windows.
Review before installing. Use it only when you explicitly want MGTV search/playback, avoid passing untrusted URLs to --direct-url, and be especially cautious on Windows until direct URL validation and browser launching are tightened. The Playwright install instructions should not be followed unless you separately trust and need that optional dependency.
scripts/search-mgtv.js:202Windows Command Injection Through Unvalidated Direct URL
README.md:32Documentation Recommends Installing an Unpinned and Unused Dependency
Referenced artifact was not completely inspected
node scripts/search-mgtv.js --query "节目名称"
Referenced artifact was not completely inspected
node scripts/search-mgtv.js --query "节目名称"
Referenced artifact was not completely inspected
node scripts/search-mgtv.js --query "节目名称"
Referenced artifact was not completely inspected
node scripts/search-mgtv.js --query "节目名称"
Referenced artifact was not completely inspected
node scripts/test.js
The natural-language examples are broad enough that a general assistant may invoke this skill on common entertainment-related requests without sufficiently specific user intent. In a tool that performs external network requests and automatically opens a browser, overbroad triggering increases the risk of surprising actions, privacy leakage of queries, and unintended navigation.
The README advertises very broad natural-language invocations such as '我想看…', '播放…', and '帮我找一下…', which can overlap with normal conversation and cause the skill to trigger when the user did not explicitly intend to invoke this specific capability. Because the skill opens browser content, accidental activation can lead to unintended network access and launching external pages, even though the underlying purpose appears legitimate rather than malicious.
Without declared permissions the skill's intent is opaque and cannot be validated.
All user-facing instructions, examples, and usage guidance are written exclusively in Chinese, and the skill does not state that it supports other languages or that Chinese is required due to a documented regional constraint. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.
The example triggers "我想看《乘风破浪的姐姐》" and "帮我找一下《大侦探》最新一期" are common entertainment requests that do not explicitly mention 芒果 TV. In a skill manifest/markdown trigger description, such broad phrasing can overlap with many other video or search skills and may cause unintended invocation.
The summary explicitly states the skill will automatically open playback pages in the system browser and also supports directly opening arbitrary URLs. Launching external pages without an explicit warning or confirmation can expose users to unwanted navigation, tracking, or phishing if search results or provided URLs are unexpected or attacker-influenced.
The natural-language examples show the agent automatically searching and opening content in response to conversational input, without disclosing that an external browser action will occur. In an agent setting, implicit external actions increase the risk of surprise navigation and make social-engineering abuse easier, especially when users paste links or ambiguous titles.
The documented trigger phrases include very broad everyday requests such as '我想看...', '播放...', and '帮我找...', which can cause the skill to activate in contexts the user did not intend for MGTV. Because the skill's action is to open browser pages automatically, overbroad activation creates a real risk of unintended navigation and surprising side effects rather than being merely cosmetic.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Linux 安装 xdg-open
sudo apt-get install xdg-utils # Debian/Ubuntu
sudo yum install xdg-utils # CentOS/RHEL
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Linux 安装 xdg-open
sudo apt-get install xdg-utils # Debian/Ubuntu
sudo yum install xdg-utils # CentOS/RHEL
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Linux 安装 xdg-open
sudo apt-get install xdg-utils # Debian/Ubuntu
sudo yum install xdg-utils # CentOS/RHEL
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Linux 安装 xdg-open
sudo apt-get install xdg-utils # Debian/Ubuntu
sudo yum install xdg-utils # CentOS/RHEL
The script exposes a --direct-url parameter even though the skill is described as an MGTV search-and-play tool. That allows the caller to use the skill as a generic browser launcher, which expands its capabilities beyond the declared trust boundary and can be abused to open phishing, malware, or tracking URLs.
When parseMgtvUrl fails to normalize an input into an MGTV playback URL, the code falls back to opening the original caller-supplied URL unchanged. This creates an open-ended browser-launch primitive that can direct users to arbitrary external content, defeating the apparent MGTV-only purpose of the skill.
In the direct URL flow, the skill opens caller-controlled URLs in the system browser, effectively providing a general-purpose URL opener. In an agent ecosystem, that is risky because other components or prompts could misuse this skill to exfiltrate users to deceptive sites under the guise of media playback.
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
This markdown file states that the skill uses MGTV's official search API and automatically opens playback pages in the system browser. Although the behavior is described, it is not presented as a safety/privacy warning to alert users that queries will be sent to a third-party service and links will be opened automatically.
The document presents the skill name, usage examples, and trigger phrases entirely in Chinese and instructs use through Chinese-language examples, without indicating whether other languages are supported or allowing user opt-in to a locale. Under the stated policy, forcing a specific language without choice can be a natural-language policy issue.
The behavior section says the skill will open search or playback pages in the browser, but the documentation does not present this as a clear up-front warning tied to triggering. Users may invoke the skill expecting a passive search response, while the skill instead launches external pages automatically, which increases the chance of unwanted browsing actions.
This manifest file only provides a broad description of the skill as a Mango TV video search and playback skill, but it does not define when the skill should be invoked or what phrases should trigger it. Without explicit trigger scope, example invocations, or exclusions, the activation conditions are ambiguous and could overlap with generic media-related requests.
Detected: suspicious.dangerous_exec