Back to skill

Security audit

game-library

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/game_query.sh:211
Finding

Arbitrary Python Code Execution Through Search Input

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/game_query.sh:20
Finding

Predictable Shared Temporary Cache Permits Information Disclosure and Symlink Attacks

Content
View full analysis
"$CACHE_DIR/$1.json"; } ``` The cache is populated through predictable file names such as: ```bash $STEAM_CLI library --limit 500 --json 2>/dev/null | write_cache "steam_library" ``` ### Technical Analysis The script uses a fixed directory under the globally shared `/tmp` namespace. It does not verify directory ownership, reject symbolic links, set restrictive permissions, or create cache files atomically. Permissions are left to the caller's current `umask`. On a multi-user system, another local user can create `/tmp/game-library-cache` before the victim runs the Skill. If that directory permits victim writes, the attacker can place a symbolic link at a predictable cache path such as `steam_library.json`. Shell output redirection follows symbolic links and truncates the destination before writing. The cached Steam data also contains library and playtime metadata. When ordinary permissive umask settings are used, the fixed directory and resulting files may be readable by other local users. ### Attack Path 1. A local attacker predicts the fixed `/tmp/game-library-cache` path. 2. Before the victim starts the Skill, the attacker creates the directory with permissive write access. 3. The attacker places a symbolic link at a predictable file name such as `steam_library.json`, targeting a file writable by the victim. 4. The victim invokes `list`, `stats`, `search`, or another command that refreshes the cache. 5. `cat > "$CACHE_DIR/steam_library.json"` follows the symbolic link and truncates or replaces the target with Steam library JSON. 6. Alternatively, if cache files are create ...[truncated 695 chars]
Remediation
View remediation
"$temporary" mv -f -- "$temporary" "$destination" } ``` Install a trap to remove unfinished temporary files. Validate cache keys against a strict allowlist if they ever become externally controllable. If `/tmp` must be used, create a private per-user directory with `mktemp -d`, mode `0700`, ownership validation, and a well-defined cleanup process. ]]>

T08 · Insecure Dependencies

Note
Location
SKILL.md:110
Finding

Unpinned Third-Party Package Installation Creates Supply-Chain Exposure

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

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.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/cn_names.py (reported line 27)May include surrounding context.

python
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
    )

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

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.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/xhh_cn_names.py (reported line 4)May include surrounding context.

python
#!/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 call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/xhh_cn_names.py (reported line 15)May include surrounding context.

python
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"],

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

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.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

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.

Content

Scanner excerpt · scripts/xhh_cn_names.py (reported line 17)May include surrounding context.

python
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
        )

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

L003 明确写明“自动显示中文游戏名”,属于默认强制特定语言/locale 的行为。文件中未说明用户可选择保持英文名、切换语言,或仅在用户明确要求中文时启用,因此存在语言/locale 策略风险。

Content

No source excerpt is available for this finding.