Back to skill

Security audit

国际象棋FEN验证可视化服务

Security checks for vulnerabilities and agentic risk

Overview

This skill claims to be a chess FEN visualizer, but it asks for and persists an external API key and routes requests through a mismatched third-party API wrapper.

Install only if you trust xiaobenyang.com and are comfortable giving this skill an API key that will be written to a local .env file. For ordinary FEN validation or ASCII board rendering, prefer a local-only skill that does not require credentials or a remote API.

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 (25)

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill advertises a simple FEN validation/visualization service but appears to rely on environment access, file reads/writes, and network calls without declaring those capabilities. This is dangerous because users and hosting platforms cannot accurately assess that the skill collects credentials, persists them, and sends data to an external service.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The documented purpose is a local chess utility, but the behavior includes external API dependency, credential handling, and persistence to .env, while also not clearly implementing the claimed FEN validation. This mismatch is dangerous because it can mislead users into disclosing secrets and submitting data to a remote service they did not expect.

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The skill claims to be about chess FEN handling, yet the workflow references unrelated Gaokao-style tooling and school-search examples. Such inconsistencies are a strong trust signal failure and may indicate copied or repurposed instructions that cause the model to invoke unintended tools or route sensitive user inputs into unrelated API paths.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
Requiring the user to provide and store an external API key is unjustified for a task that should be fully local, such as validating FEN and rendering an ASCII board. This creates unnecessary credential collection and expands the attack surface by training users to hand over secrets for a low-risk utility.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The documented behavior focuses on generic API-calling and returning raw upstream data rather than a self-contained chess function. This is dangerous because it obscures what data leaves the environment and may expose users to unvalidated remote content or unexpected behavior under the guise of a simple local utility.

Description-Behavior Mismatch

High
Confidence
96% confidence
Finding
This file implements a generic outbound MCP API proxy that can invoke arbitrary upstream tools by passing through mcp_id, tool_name, and params, which is far broader than the stated purpose of FEN validation and ASCII board rendering. In a narrowly scoped chess utility, this creates an unjustified capability expansion that could enable data exfiltration, unintended external actions, or hidden tool brokering if exposed through the assistant.

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
The call_tool interface accepts caller-controlled mcp_id, tool_name, and params and forwards them to an external API with authentication, effectively enabling arbitrary external tool execution under this skill's credentials. For a FEN validation service, that capability is unnecessary and materially increases the risk of abuse, especially if a prompt or downstream component can influence those arguments.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
This code persists and mutates an API key in a skill whose stated purpose is only FEN validation and ASCII board rendering, which is a strong capability mismatch. Unrelated secret-management behavior increases the chance the package is repurposed to collect or retain credentials and expands the blast radius if the skill or host is compromised.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The skill explicitly reads and writes .env secrets for an unrelated external API, despite the advertised functionality not requiring such access. In context, this is dangerous because it grants credential access capabilities that are unnecessary for chess FEN validation, making secret collection or unintended retention much harder to justify.

Intent-Code Divergence

Medium
Confidence
91% confidence
Finding
The configuration docstring and identifiers reference a different domain ('高考' / xiaobenyang) than the published chess skill, indicating probable code reuse or a swapped backend. This mismatch is dangerous because it undermines trust boundaries and suggests the skill may communicate with or manage credentials for an unrelated service.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill instructs the model to ask for an API key and store it without warning the user about persistence, scope, or privacy implications. This is dangerous because users may unknowingly disclose a reusable secret that is then written to disk for future use.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The code stores a sensitive API key in a local .env file without any visible user warning, consent flow, or disclosure. Persisting secrets to disk by default increases exposure to local file leakage, accidental commits, backups, and reuse by other processes on the same system.

Ssd 3

Medium
Confidence
96% confidence
Finding
The skill creates a natural-language flow for collecting sensitive credentials and persisting them for later use. Conversational secret collection is risky because it normalizes handing credentials to the model and increases the chance of accidental logging, disclosure, or reuse beyond the user's expectations.

Credential Access

High
Category
Privilege Escalation
Content
model_config = SettingsConfigDict(
        env_prefix="XBY_GAOKAO_",
        env_file=".env",
        env_file_encoding="utf-8",
        extra="ignore",
    )
Confidence
89% confidence
Finding
Configuring the skill to load a .env file enables access to locally stored secrets, which is especially suspicious given the mismatch between the chess skill's stated purpose and the unrelated external API configuration. In this context, credential-access capability is unnecessary and expands what the skill can learn about the host environment.

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
97% confidence
Finding
The code forcefully reads .env content and extracts XBY_APIKEY during model initialization, creating explicit credential access behavior. Because FEN validation/visualization does not require secret ingestion, this access is unjustified and could expose or normalize handling of 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
97% confidence
Finding
Reading the .env file contents directly gives the skill direct visibility into locally stored secrets. In the context of a supposedly offline or simple utility skill, this is an unjustified privilege that increases the risk of secret exposure, misuse, or hidden dependency on another service.

Credential Access

High
Category
Privilege Escalation
Content
if line.startswith("XBY_APIKEY="):
                    self.api_key = line.split("=", 1)[1].strip()
                    break
        # 如果环境变量有值,覆盖 .env 的值
        env_val = os.getenv("XBY_APIKEY", "")
        if env_val:
            self.api_key = env_val
Confidence
93% confidence
Finding
This logic prefers the XBY_APIKEY environment variable, demonstrating intentional credential ingestion for an unrelated service. In a chess FEN validator, consuming external API secrets is contextually suspicious and broadens the consequences of running the skill in environments where such secrets are present.

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
98% confidence
Finding
This function is dedicated to saving an API key into .env, which is a direct credential-management capability unrelated to the advertised FEN validation service. It increases long-term exposure of the secret on disk and suggests the skill may retain credentials beyond the user's expectations.

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
96% confidence
Finding
The helper explicitly sets an API key and persists it to .env, combining credential intake with durable storage. Given the declared chess-only scope, this is an unjustified credential-access pathway that makes the skill materially more dangerous than its description suggests.

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
96% confidence
Finding
The dependency is specified with a lower-bound constraint (`requests>=2.31.0`) rather than an exact version or controlled range, which makes builds non-reproducible and can introduce unexpected or vulnerable versions over time. In an MCP service, dependency drift can silently change HTTP behavior or pull in a compromised release if the package ecosystem is attacked.

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
95% confidence
Finding
`pydantic>=2.7.0` is unpinned, so future installs may resolve to different versions with behavioral or security changes. While not an immediate exploit by itself, this weakens supply-chain control and makes the service less predictable and harder to audit.

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
95% confidence
Finding
`pydantic-settings>=2.2.0` allows uncontrolled version drift, which can introduce breaking or insecure changes through the dependency chain. For an AI-integrated service that may process external inputs and environment configuration, reproducibility and dependency integrity matter.

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
96% confidence
Finding
`python-dotenv>=1.0.1` is unpinned, creating the same supply-chain and reproducibility risk as the other dependencies. Because this package influences environment-variable loading, unexpected version changes can affect configuration handling in security-relevant ways.

Known Vulnerable Dependency: requests==2.31.0 — 5 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) +2 more

Medium
Category
Supply Chain
Confidence
98% confidence
Finding
The dependency set permits `requests==2.31.0`, and that version is associated with multiple advisories including credential leakage via malicious URLs and request verification issues. In an MCP server, even if the primary purpose is FEN validation, any present or future outbound HTTP usage through `requests` could expose secrets or weaken transport security if vulnerable code paths are hit.

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
87% confidence
Finding
The allowed dependency includes `python-dotenv==1.0.1`, which is reported as vulnerable to symlink-following in `set_key`, potentially enabling arbitrary file overwrite in specific usage patterns. This skill's stated purpose does not suggest direct use of `.env` mutation, so the practical risk may be limited, but the vulnerable version should still not be allowed in a production dependency set.

Static analysis

No suspicious patterns detected.