Back to skill

Security audit

React组件库文档服务

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to provide Composer Kit documentation through an external API, but it has unclear provenance and stores a required API key in plaintext.

Install only if you trust Xiaobenyang as the backend for this documentation service. Be aware that the skill asks for an API key, stores it in plaintext in .env, and sends tool parameters to mcp.xiaobenyang.com; the leftover gaokao references and generic API bridge make the package worth manual review before 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 (22)

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill declares no permissions while its documented behavior clearly implies access to environment variables, local file read/write, and network communications. This is dangerous because it hides sensitive capabilities from users and reviewers, making secret collection and external exfiltration harder to spot and consent to.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The skill claims to be a documentation MCP server, but its behavior includes collecting and persisting an API key and depending on an unrelated external service. This mismatch undermines informed consent and increases the risk that users provide secrets to a skill whose true function and trust boundary are unclear.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The documentation says the skill serves React component docs, but the workflow and project structure reference an unrelated gaokao API and key-management flow. Such contradictory identity signals are a strong red flag because they suggest copy-pasted or repurposed instructions that could trick users into disclosing secrets to an unrelated backend.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The example workflow instructs the model to call an unrelated school-search function, contradicting the declared Composer Kit documentation purpose. This inconsistency can cause misrouting of user requests, unintended data disclosure to the wrong tool or API, and erosion of trust in what the skill actually does.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The documented project path 'xiaobenyang_gaokao_skill/' contradicts the declared identity of a React component-library documentation service. This increases suspicion that the skill was repurposed from another project, which can conceal stale integrations, incorrect endpoints, or secret-handling logic unrelated to user expectations.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
This file implements a generic upstream MCP API caller that accepts arbitrary mcp_id, tool_name, and params, which materially exceeds the stated purpose of a React component documentation service. In an agent-skill context, this creates hidden capability expansion: a skill presented as documentation-only can proxy requests to external tools and transmit user-supplied data and credentials to an upstream service.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The code acts as a network proxy to an upstream tool selected by headers and request parameters, rather than a narrowly scoped documentation retriever. This mismatch increases the risk of unintended data exfiltration, unauthorized external actions, or abuse of the skill as a generic bridge to capabilities users and reviewers would not expect from the declared context.

Description-Behavior Mismatch

High
Confidence
94% confidence
Finding
This module implements API key persistence and credential management that is inconsistent with the stated purpose of a React component documentation service. In a skill/plugin context, adding credential storage broadens trust requirements and can expose users to secret capture or unintended retention, especially when the service description does not clearly disclose this behavior.

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
Writing secrets to a local .env file creates a durable credential exposure surface that may be readable by other local processes, accidentally committed to source control, or included in logs/backups. For a documentation-oriented skill, this capability is disproportionate and increases the chance that users provide sensitive credentials under false assumptions about the skill's function.

Intent-Code Divergence

Medium
Confidence
89% confidence
Finding
The class docstring refers to a different skill/domain than the advertised React documentation service, indicating code reuse or mismatch between claimed and actual behavior. Such provenance mismatch is a security concern because it can hide undeclared external dependencies, data flows, or credential handling not expected by users reviewing the skill metadata.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
This code transmits both request parameters and an API key to an external service, but the file provides no user-facing notice, consent flow, or minimization controls. In a skill environment, silent transmission of potentially sensitive prompts or data to an upstream third party can violate user expectations and create privacy and trust risks even if transport security is present.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The code persists the API key to disk without any user-facing warning, confirmation, or explanation of retention. Silent secret persistence undermines informed consent and can lead to credential leakage through filesystem access, repository commits, or machine sharing.

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
92% confidence
Finding
The code forcibly reads .env manually to extract a specific API key, bypassing normal configuration abstractions and increasing the likelihood of mishandled secrets. In a skill that does not clearly justify credential usage, custom secret-reading logic raises concern about undeclared credential dependency and persistent plaintext secret access.

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
92% confidence
Finding
Opening and reading the .env file directly exposes plaintext secrets to application logic and creates additional paths for accidental disclosure or misuse. Because this skill's stated function is documentation serving, direct credential-file access is more suspicious and less justifiable than in a backend integration service.

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
97% confidence
Finding
This function is explicitly designed to save an API key into a local .env file, which stores credentials in plaintext and creates long-lived exposure. In the context of a purported documentation skill, this is especially dangerous because users may not expect secret storage behavior and may grant unnecessary trust.

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
95% confidence
Finding
This function couples setting an API key with persisting it to disk, making secret retention the default behavior. Default-on credential persistence increases accidental leakage risk and is disproportionate for the declared skill purpose, which makes the mismatch more dangerous.

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 lower-bound version only, which allows future installs to resolve to different versions over time. This weakens build reproducibility and can introduce unexpected vulnerable or incompatible releases through the supply chain.

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 this package means deployments are not reproducible and may silently pick up newer releases. That increases supply-chain risk and can lead to security regressions if a bad or vulnerable version is published.

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
A minimum-version requirement without an upper bound or exact pin allows package resolution to drift across environments. This can expose the project to supply-chain instability, accidental breaking changes, or newly introduced vulnerable releases.

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 package is not pinned to a single vetted version, so installs may vary over time and between environments. That creates a low-severity but real supply-chain risk by making it easier for vulnerable or malicious releases to be pulled in.

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
91% confidence
Finding
The requirements allow installation of requests 2.31.0, which is flagged with multiple advisories including credential leakage via malicious URLs and request verification issues in Session behavior. In an MCP/documentation service that may fetch remote content or interact with network resources, a vulnerable HTTP client can expose secrets or weaken transport security assumptions.

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 version includes python-dotenv 1.0.1, which is reported as vulnerable to symlink-following behavior in set_key that could enable arbitrary file overwrite in affected usage patterns. This is context-dependent and becomes more dangerous only if the skill writes dotenv files in attacker-influenced paths, but it remains a genuine dependency risk.

Static analysis

No suspicious patterns detected.