T09 · Insecure Skill Coding Practices
- Location
scripts/game_query.sh:211- Finding
Arbitrary Python Code Execution Through Search Input
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its game-library purpose, but it needs Review because crafted search text can execute code and account-linked library data is cached insecurely.
Install only if you are comfortable granting this skill access to your Steam/Epic library metadata and letting it contact Steam and Xiaoheihe for Chinese-name data. Before use, the search interpolation bug and /tmp cache handling should be fixed, and Steam CLI forwarding should be restricted to clearly read-only operations.
scripts/game_query.sh:211Arbitrary Python Code Execution Through Search Input
scripts/game_query.sh:20Predictable Shared Temporary Cache Permits Information Disclosure and Symlink Attacks
SKILL.md:110Unpinned Third-Party Package Installation Creates Supply-Chain Exposure
A second description/behavior mismatch is present: the skill is presented as an interactive library-analysis tool, but the content shows significant emphasis on offline cache enrichment and undeclared third-party lookups via Xiaoheihe. Hidden or underemphasized external access is risky because users may invoke a benign-looking library query and unintentionally trigger data transfers to third parties.
A second description/behavior mismatch is present: the skill is presented as an interactive library-analysis tool, but the content shows significant emphasis on offline cache enrichment and undeclared third-party lookups via Xiaoheihe. Hidden or underemphasized external access is risky because users may invoke a benign-looking library query and unintentionally trigger data transfers to third parties.
The skill advertises and documents shell execution, network access, and cache/file operations, but it does not declare any explicit tool scope or allowed-tools boundary. This weakens least-privilege controls and makes it easier for the skill to invoke broader capabilities than users or the host may expect, especially because it reaches external services and local cache paths.
The trigger terms are broad and overlap with ordinary conversation about games, increasing the chance of accidental activation. In a skill that can run shell commands and contact third-party services, misfires can expose account-linked library data or perform unexpected network actions without clear user intent.
The skill documentation states that it accesses third-party services and account-linked game-library data, but it does not provide a clear privacy notice or data-transfer warning to users. Because it queries Steam/Epic-related tooling and external Chinese-name sources, users may not realize their library metadata or search terms could be sent to outside services.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def fetch_steam_library():
"""Get Steam library via CLI"""
import subprocess
result = subprocess.run(
["steam", "library", "--limit", "500", "--json"],
capture_output=True, text=True, timeout=120
)
The script exposes commands beyond the skill’s stated query scope, including cache mutation and duplicate-detection functionality. Scope expansion increases attack surface and can cause the agent to perform actions or reveal behaviors users did not reasonably expect from a read-only game-library lookup skill.
The script silently writes Steam and Epic library contents to /tmp cache files, which may expose sensitive user inventory data to other local users or processes depending on system configuration. The lack of disclosure also prevents informed consent for local persistence of potentially private gaming history.
The skill invokes external CLIs and includes update actions that likely trigger network activity, but does not clearly inform the user that third-party tools and remote services may be contacted. In an agent setting, undisclosed external execution and network access can violate user expectations and organizational policy boundaries.
The script presents command output, help text, and usage guidance almost entirely in Chinese, which imposes a specific language on users. There is no indication that this locale choice is optional, configurable, or justified as a region-specific tool.
The steam subcommand forwards arbitrary user-supplied arguments directly to the external Steam CLI, effectively turning the skill into a generic command proxy. Even without invoking a shell, this bypasses the skill’s intended restrictions and may expose privileged or state-changing Steam CLI operations not covered by the manifest.
Updater commands perform network-backed or local cache-modifying actions in a skill described as a query tool. That mismatch can lead to unexpected external requests and persistent file changes, increasing trust and supply-chain risk for users who expect read-only behavior.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
#!/usr/bin/env python3
"""
Supplement Chinese game names from Xiaoheihe (小黑盒) web API.
Uses the public share page endpoint: https://api.xiaoheihe.cn/game/share_game_detail
No API key required - this is a public web endpoint.
"""
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def get_xhh_cn_name(appid):
"""Get Chinese name from xiaoheihe share page (no auth needed)"""
try:
result = subprocess.run(
["curl", "-sL",
f"https://api.xiaoheihe.cn/game/share_game_detail?appid={appid}&game_type=pc",
"-H", "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"],
The manifest describes a cross-platform game library query tool that searches and summarizes game-library data. Launching an external process via subprocess introduces command-execution capability, which is not justified by the stated purpose of querying game libraries or supplementing Chinese names.
The script transmits a user's game app IDs to a third-party service (Xiaoheihe) without any visible consent, opt-in, or minimization controls. In a game-library skill, this is more sensitive than generic web access because the library contents can reveal user preferences and account-linked behavior, creating a privacy leak to an unrelated external platform.
try:
result = subprocess.run(
["curl", "-sL",
f"https://api.xiaoheihe.cn/game/share_game_detail?appid={appid}&game_type=pc",
"-H", "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"],
capture_output=True, text=True, timeout=10
)
This code emits user-facing status messages entirely in Chinese, which imposes a specific language/locale on all users without offering any opt-in or alternative. That matches the natural-language policy violation category for forced language without user choice.
L003 明确写明“自动显示中文游戏名”,属于默认强制特定语言/locale 的行为。文件中未说明用户可选择保持英文名、切换语言,或仅在用户明确要求中文时启用,因此存在语言/locale 策略风险。