Back to skill

Security audit

文献综述助手

Security checks for vulnerabilities and agentic risk

Overview

This literature-review skill is not clearly malicious, but it asks for and stores an API key locally while showing mismatched third-party and gaokao-related wiring that users should review carefully.

Install only if you are comfortable giving a XiaoBenYang API key to this skill and having it saved in a local plaintext .env file. Review or remove the gaokao-related documentation drift before relying on it, and prefer using a limited-scope API key that can be revoked.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding
The skill documentation describes capabilities that require environment access, local file reads/writes, and outbound network access, but it does not declare those permissions explicitly. This reduces transparency and prevents users or a host platform from making an informed trust decision, especially because the skill also handles API secrets and persists them locally.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The skill claims to be a literature-review MCP server, but the documented behavior includes storing API keys locally and acting as a client/proxy to a specific third-party service with hardcoded identifiers. This mismatch can mislead users about what data leaves the environment and what trust assumptions they are making, increasing the chance of credential exposure or unintended data sharing.

Intent-Code Divergence

High
Confidence
91% confidence
Finding
The documentation for a literature-review assistant includes an unrelated example call to a gaokao school-search tool, indicating copy-paste drift or confused tool routing instructions. In an agent setting, this can cause the model to invoke the wrong tool or send user inputs to an unintended backend, leading to data leakage, incorrect actions, or unsafe behavior.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
Referencing an unrelated `xiaobenyang_gaokao_skill` project and mismatched API-key guidance in a literature-review skill suggests the skill may be wired to the wrong codebase or backend. That increases the risk that user queries or secrets are handled by unintended components, which is particularly dangerous because the skill requests and stores an API key.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
This module persistently stores and mutates an API key in a local .env file even though that capability is not clearly justified by the stated literature-review assistant purpose. Persisting secrets locally increases the risk of credential exposure through source control, backups, shared workspaces, or other local processes.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The skill includes local credential file writing capability that is broader than what is needed for literature search functionality. Unnecessary secret-writing behavior expands the attack surface and can leave API keys on disk in plaintext where they may be recovered later.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The code writes the API key to .env without any visible user-facing disclosure, confirmation, or warning that the secret will be stored on disk. Silent plaintext persistence can surprise users and lead to accidental credential leakage via repository commits, logs, backups, or multi-user systems.

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 code explicitly and forcibly reads XBY_APIKEY from a local .env file outside the standard settings flow, creating a dedicated credential access path. This increases the chance of handling secrets in unexpected ways and makes the skill more dangerous because secret access is being implemented manually without clear necessity for the stated purpose.

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
Opening and reading the .env file directly to extract an API key is unnecessary secret handling that bypasses safer abstractions. In the context of a literature-review skill, this hidden credential-reading behavior is more suspicious because it is not part of the core user-facing functionality.

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
95% confidence
Finding
This function is explicitly designed to save an API key into a local .env file, meaning credentials are stored in plaintext on disk. That creates a practical exposure path through accidental commits, insecure file permissions, backups, endpoint compromise, or other local access.

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
94% confidence
Finding
This entry point persists a provided API key and updates global runtime state, combining long-term storage with broad in-process availability. For a literature-review assistant, this is more dangerous than necessary because it embeds secret-management behavior into a feature set that should primarily perform data access, not local credential storage.

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 dependency is specified with a minimum version bound only, which allows future installs to resolve to different versions over time. This weakens reproducibility and can unintentionally introduce vulnerable or breaking upstream releases into the 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
Using an unpinned version for pydantic makes builds non-reproducible and increases supply-chain risk because future installations may pull in unexpected releases. In a server-side MCP skill, dependency drift can affect validation logic and security posture without code changes.

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 unpinned pydantic-settings dependency allows dependency resolution to vary across environments and over time. That can introduce insecure or incompatible releases indirectly into configuration-loading code used by the skill.

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
An unpinned python-dotenv version makes installations non-deterministic and can pull in future releases with security regressions or behavior changes. Because this package commonly handles environment/configuration files, drift can affect sensitive configuration handling.

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 requirements permit installation of requests 2.31.0, a version with multiple published advisories, including issues involving credential leakage and TLS/session verification behavior. This is more relevant in a literature-review MCP server because it is likely to make outbound HTTP requests to academic services, increasing exposure to malicious URLs, redirects, or untrusted network interactions.

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 requirements permit installation of 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. The danger depends on whether the skill actually invokes set_key on attacker-influenced paths, so the practical risk here is lower but still valid as a dependency hygiene issue.

Static analysis

No suspicious patterns detected.