Back to skill

Security audit

OSRS玩家数据服务

Security checks for vulnerabilities and agentic risk

Overview

This OSRS stats skill appears to work through an external XiaoBenYang API, but it stores an API key locally and contains mismatched copied GaoKao project references that make its scope unclear.

Install only if you are comfortable giving a XiaoBenYang API key to this skill and having it saved in a plaintext .env file in the working directory. Prefer using a limited, revocable key, avoid running it in a sensitive repository, and review or remove the stale GaoKao/XiaoBenYang mismatches before trusting it for routine use.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (19)

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill advertises no declared permissions while the documented behavior clearly requires environment access, file read/write, and network access. This creates a transparency and consent gap: a user or hosting platform may permit execution under false assumptions, while the skill can persist secrets locally and exfiltrate data to an external service.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The declared purpose is an OSRS stats service, but the documentation reveals unrelated behavior: storing API keys in local .env files, acting as a generic proxy to an external XiaoBenyang platform, and retaining artifacts from a gaokao/school-search project. This mismatch is dangerous because it obscures actual data flows and trust boundaries, increasing the risk of credential misuse, unintended external transmission, and user deception.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
Residual gaokao/school-search project structure and examples inside an OSRS skill indicate copy-paste reuse without proper review. This kind of inconsistency can cause the wrong tools or endpoints to be invoked, confuse operators about what the skill actually does, and conceal unsafe inherited behaviors such as unrelated API routing or secret handling.

Description-Behavior Mismatch

High
Confidence
95% confidence
Finding
The module provides functions to persist and mutate a local API key in .env and process environment state, which is inconsistent with a supposedly read-only OSRS stats service. That mismatch materially increases suspicion because credential-handling and local state mutation expand the attack surface and could enable unauthorized secret capture or persistence on a user's machine.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The code implements plaintext storage of an API key to a local .env file without demonstrating a strong need for such capability in a player-statistics query skill. Even absent overt exfiltration, unnecessary credential persistence creates a recoverable local secret that may be exposed via logs, backups, repository mistakes, or other local compromise.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
The docstring identifies the configuration as belonging to a different '高考' skill, which is a strong indicator of code repurposing or supply-chain mismatch. In the context of a security review, such identity inconsistency is dangerous because it undermines trust in the declared functionality and suggests hidden or unintended behavior may have been carried over.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The environment prefix and related naming point to a different XBY/高考 system rather than the advertised OSRS service. This inconsistency increases the likelihood that the skill is misrepresented or bundled with unrelated backend integration, which can mislead users into supplying credentials for the wrong service.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The function writes an API key to .env with no user-facing warning, confirmation, or explanation that the secret will be stored on disk. Silent persistence of credentials is risky because users may expect temporary use only, while the stored key can later be read by other processes, users, backups, or accidental source-control commits.

Ssd 3

Medium
Confidence
94% confidence
Finding
The instruction to directly display raw API data creates a real risk of exposing sensitive fields returned by the backend, including echoed API keys, internal identifiers, error traces, or other confidential metadata. In this skill's context the danger is elevated because the system explicitly collects a user-supplied API key and proxies requests to an external service of unclear scope.

Credential Access

High
Category
Privilege Escalation
Content
default_year: int = 2025

    def model_post_init(self, __context):
        # 强制从 .env 文件读取 XBY_APIKEY
        env_path = Path(".env")
        if env_path.exists():
            content = env_path.read_text(encoding="utf-8")
Confidence
91% confidence
Finding
The post-init hook explicitly reads .env to extract XBY_APIKEY outside the normal settings mechanism, indicating deliberate direct credential access. In the context of a skill whose stated purpose is public player statistics, this hidden secret-loading behavior is disproportionate and increases the chance of misuse, misrouting, or covert dependence on unrelated credentials.

Credential Access

High
Category
Privilege Escalation
Content
def model_post_init(self, __context):
        # 强制从 .env 文件读取 XBY_APIKEY
        env_path = Path(".env")
        if env_path.exists():
            content = env_path.read_text(encoding="utf-8")
            for line in content.splitlines():
Confidence
91% confidence
Finding
The code conditionally opens and reads the local .env file, which is a direct credential-access action. Given the mismatch between the advertised OSRS functionality and the XBY/高考 credential namespace, this is especially concerning because it suggests the skill may interact with unrelated secrets present on the host.

Credential Access

High
Category
Privilege Escalation
Content
def save_api_key_to_env(api_key: str) -> bool:
    """将API key保存到.env文件"""
    try:
        env_path = Path(".env")
        lines = []
        if env_path.exists():
            lines = env_path.read_text(encoding="utf-8").splitlines()
Confidence
93% confidence
Finding
This function is explicitly designed to save an API key into .env, creating plaintext credential persistence on disk. If the host or workspace is later accessed by another process, user, backup system, or repository sync, the secret can be recovered and abused.

Credential Access

High
Category
Privilege Escalation
Content
def set_api_key(api_key: str) -> bool:
    """设置API key并持久化到.env"""
    if not api_key or not api_key.strip():
        return False
    api_key = api_key.strip()
Confidence
90% confidence
Finding
The public helper advertises setting and persisting an API key to .env, making credential storage a first-class feature of the skill. For a service presented as a data-query tool, this expands trust requirements and creates unnecessary long-term secret exposure if the functionality is not essential.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
94% confidence
Finding
The dependency is specified with a lower-bound range (`requests>=2.31.0`) instead of an exact version or constrained range, which makes builds non-reproducible and can silently pull in newer releases with breaking changes or newly introduced vulnerabilities. In an MCP server that depends on network-facing libraries, this weakens supply-chain control even if it is not immediately exploitable on its own.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
92% confidence
Finding
`pydantic>=2.7.0` allows any newer major/minor release acceptable to pip resolution, reducing reproducibility and increasing the risk of accidental adoption of a compromised or incompatible version. For a service that parses external/player data, dependency drift can create security and reliability issues over time.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
92% confidence
Finding
`pydantic-settings>=2.2.0` is unpinned, so future installs may resolve to different versions than originally tested. This is a supply-chain hygiene weakness that can introduce unexpected behavior or security regressions, especially in configuration-handling code.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
93% confidence
Finding
`python-dotenv>=1.0.1` permits version drift and undermines reproducible builds, which is particularly relevant for a package involved in environment/config loading. This does not prove exploitation, but it increases supply-chain risk and makes controlled patch management harder.

Known Vulnerable Dependency: requests==2.31.0 — 3 advisory(ies): CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi); CVE-2026-25645 (Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility func)

Low
Category
Supply Chain
Confidence
96% confidence
Finding
The finding indicates compatibility with `requests` 2.31.0, which has published advisories including credential leakage via malicious URLs and request verification issues in some session flows. Because this skill is an MCP server that likely makes outbound HTTP requests to fetch live OSRS player and leaderboard data, use of a vulnerable HTTP client is more relevant than in an offline-only tool.

Known Vulnerable Dependency: python-dotenv==1.0.1 — 1 advisory(ies): CVE-2026-28684 (python-dotenv: Symlink following in set_key allows arbitrary file overwrite via )

Low
Category
Supply Chain
Confidence
89% confidence
Finding
The dependency is compatible with `python-dotenv` 1.0.1, which is reported to have a symlink-following issue in `set_key` that could enable arbitrary file overwrite in affected usage patterns. In this skill's context, the risk depends on whether the server ever modifies `.env` files or invokes `set_key`; if it only reads environment variables, exploitability may be limited, but the vulnerable package version is still a real concern.

Static analysis

No suspicious patterns detected.