Back to skill

Security audit

加密货币数据API服务

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to provide crypto/DEX data through an external API, but it has confusing branding and persists an API key in a local plaintext .env file despite a no-configuration claim.

Install only if you trust the XiaoBenYang service and are comfortable giving it an API key. Treat the key as sensitive: the skill stores it in a local .env file in plaintext, so avoid using a high-privilege key, keep the file out of source control and backups, and rotate the key if it may have been exposed.

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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (17)

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill documentation describes capabilities that require environment access, file read/write, and network access, yet no permissions are declared. This creates a transparency and consent gap: the agent may request, persist, and use secrets or modify local state without the user having been clearly informed through a permission model.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
The skill claims to work '无需配置' and presents itself as a straightforward DexPaprika data service, but it actually requires a third-party API key, persists that credential locally, and appears tied to a differently branded XiaoBenYang/Gaokao wrapper. This mismatch can mislead users about trust boundaries, data flow, and secret handling, increasing the chance they disclose credentials under false assumptions.

Description-Behavior Mismatch

Medium
Confidence
91% confidence
Finding
The skill metadata claims a no-configuration crypto/DEX data service, but this file implements persistent API key management in a local .env file. That mismatch can mislead users into supplying or storing secrets they would not expect to be required, increasing the risk of accidental credential exposure through local files, logs, backups, or source control.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
The docstring and comments describe a different skill/domain than the declared crypto data service, indicating code reuse or packaging mismatch. This undermines trust in the skill's provenance and can conceal unexpected behavior such as contacting unrelated services or collecting credentials under false pretenses.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly instructs the agent to ask the user for an API key and save it via configuration, but it does not disclose persistence, storage location, retention, or security properties. Users may provide sensitive credentials without informed consent, and local persistence increases the blast radius if the environment, logs, or files are later exposed.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
This code sends both arbitrary request parameters and a bearer-like API credential to an external service, but the file provides no consent flow, disclosure, redaction, or parameter allowlisting. In an AI skill context, tool inputs may contain sensitive user-provided data, so silent transmission to an upstream API increases the risk of unintended data exfiltration or privacy violations.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The function writes the API key directly into a .env file without any user-facing warning, confirmation, or secure storage mechanism. Users may unknowingly persist credentials in plaintext where they can be exposed via filesystem access, backups, shell tooling, or accidental repository commits.

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
82% confidence
Finding
The code manually and forcibly parses the .env file to extract XBY_APIKEY, bypassing the normal settings abstraction and specifically targeting a credential entry. In the context of a mismatched skill package, this targeted secret handling is more suspicious because it reads and prioritizes a credential outside the declared env_prefix model, making review and user expectations harder to trust.

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
82% confidence
Finding
This explicit check for a local .env file is part of custom credential retrieval logic that seeks a specific API key from disk. While local configuration loading can be legitimate, in this skill it contributes to undisclosed secret access behavior and increases the risk of reading credentials from developer workspaces without clear user awareness.

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
90% confidence
Finding
The function is explicitly designed to save an API key into a local .env file, creating a plaintext credential at rest. In a skill context where the service was described as requiring no configuration, this persistence is more dangerous because users may not realize a secret is being written to disk.

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
This function persists the API key to .env as part of normal operation, institutionalizing plaintext secret storage. That creates ongoing exposure through local compromise, backups, diagnostics, or accidental inclusion in repositories and deployment artifacts.

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 version only, which allows future builds to resolve to different versions over time. This weakens supply-chain reproducibility and can unintentionally introduce vulnerable or incompatible releases, especially for an API-facing service that depends on HTTP libraries.

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
Using an unpinned pydantic version makes installations non-reproducible and increases supply-chain risk because future releases may change behavior or introduce vulnerabilities. While not an exploit by itself, it reduces control over the runtime environment.

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
An unpinned pydantic-settings dependency permits drift across installations, which can lead to unexpected behavior or exposure to newly introduced vulnerable versions. This is a software supply-chain hygiene issue rather than direct malicious logic in the file.

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
The unpinned python-dotenv requirement allows uncontrolled upgrades, which is risky because this package can influence configuration and secrets loading behavior. In an AI-accessible API service, configuration-handling libraries should be tightly controlled to avoid accidental exposure or insecure regressions.

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
90% confidence
Finding
The requirements allow installation of requests 2.31.0, which is associated with multiple advisories including credential leakage via malicious URLs and request verification issues in Session handling. Because this skill is an API service that likely performs outbound HTTP requests to cryptocurrency and DEX data sources, the affected library sits directly on a security-relevant attack surface.

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
84% confidence
Finding
The allowed python-dotenv version includes an advisory involving symlink following in set_key, which can enable arbitrary file overwrite in affected usage patterns. This file alone does not prove the vulnerable function is used, but carrying a version with a known issue is still a genuine dependency risk, particularly for software that may manipulate environment files during setup or runtime.

Static analysis

No suspicious patterns detected.