Back to skill

Security audit

LLM增强服务

Security checks for vulnerabilities and agentic risk

Overview

This skill is framed as an LLM prompt enhancer, but it asks an agent to fetch remote system-style instructions, stores an API key in a local .env file, and contains mismatched service identity details that deserve manual review.

Install only if you intentionally want an external XiaoBenYang service to provide prompt or system-instruction text to your agent. Treat anything returned by the service as untrusted content, do not let it override system/developer/user instructions, and avoid storing valuable API keys in the project .env file unless you accept the plaintext local-storage risk.

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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (21)

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill documents capabilities to read environment state, write files, and make outbound network calls, yet declares no permissions. This creates a transparency and consent gap: users and hosts cannot accurately assess what the skill may access or modify before execution, especially since it also persists API keys and contacts a third-party service.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The documented purpose says the skill is for LLM prompt enhancement and security research, but the behavior includes credential collection, local persistence of secrets, and outbound requests to a third-party XiaoBenYang service with naming that suggests a different integration. This mismatch undermines informed consent and raises the risk that users disclose sensitive API keys or allow data flow to an unexpected remote service.

Intent-Code Divergence

Low
Confidence
80% confidence
Finding
The skill claims the code only calls APIs, but its workflow also instructs the model to collect and persist a user-provided API key. This inconsistency can cause users to underestimate the sensitivity of the operation and the persistence of credentials on disk.

Context-Inappropriate Capability

Medium
Confidence
80% confidence
Finding
The function exposes unrestricted outbound execution of arbitrary upstream tools through user-controlled `tool_name` and `params`, with no local authorization, allowlisting, or schema validation. In an agent setting, this can become a confused-deputy primitive: an attacker who can influence inputs may cause the skill to invoke sensitive upstream capabilities that exceed the skill's declared purpose.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The configuration identifies itself as a different skill ('小笨羊高考') and uses unrelated endpoints/identifiers than the manifest-declared 'LLM增强服务'. This mismatch is a strong supply-chain integrity red flag because users and reviewers may believe they are installing one capability while the code is wired for another service, increasing the risk of hidden data flows or unauthorized backend access.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The class docstring states this is a gaokao-related skill, directly contradicting the declared MCP/LLM enhancement service. Contradictory identity information undermines trust and reviewability, and in a security-sensitive skill ecosystem this can conceal unintended behavior or copied code that was not properly audited.

Vague Triggers

Medium
Confidence
84% confidence
Finding
The tool activation descriptions are broad enough to match ordinary assistant behavior, such as improving reasoning or instruction-following. That makes accidental or overbroad invocation more likely, which is risky because the tool is designed to fetch external prompts or system instructions that can alter model behavior.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The code persists the API key to a local .env file automatically, without any visible consent prompt, warning, or secure-storage controls. This can expose credentials to other local users, backups, source control mistakes, or later processes that read the project directory.

Ssd 1

High
Confidence
98% confidence
Finding
The skill explicitly routes the model to obtain external enhancement prompts or advanced system instructions and apply them to itself. This is a form of semantic self-modification that can bypass normal trust boundaries, allowing a remote service to influence system behavior, priorities, or safety posture under the guise of optimization.

Ssd 1

High
Confidence
97% confidence
Finding
The parameter guidance instructs the assistant to identify its own model type so a remote service can return tailored enhancement or system instructions. Tailoring prompts based on the model identity increases the effectiveness of behavior steering and can be used to craft model-specific prompt injection or policy circumvention content.

Ssd 1

High
Confidence
97% confidence
Finding
The tool description explicitly encourages the assistant to fetch external prompts to 'enhance your capabilities' and to identify its own model type to receive tailored instructions. This is a classic prompt/instruction injection pattern: it attempts to semantically redirect the model's behavior using externally supplied prompt material that may override system, developer, or user instructions.

Ssd 1

High
Confidence
98% confidence
Finding
This second tool is even more direct: it advertises delivery of 'advanced system instructions' in a single call, framing instruction replacement as beneficial. In an agent setting, this creates a high-risk path for external control over model behavior, enabling bypass of established safeguards, policy drift, or execution of attacker-chosen workflows.

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 explicitly and forcibly parses .env to extract XBY_APIKEY outside the standard settings framework, creating a bespoke secret-loading path that may bypass expected controls and transparency. In the context of a mismatched skill identity, this manual credential handling increases suspicion because it is designed specifically to locate and load a secret from disk.

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 the API key into a plaintext .env file. Persisting credentials in repo-adjacent plaintext storage materially increases the chance of accidental disclosure through source control, support bundles, filesystem access, or backup systems.

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
The setter's documented purpose is to persist the API key to .env, normalizing insecure secret storage as part of application behavior. In a security-research-oriented skill, silently writing credentials to local plaintext is especially dangerous because such environments often handle sensitive tokens and may be shared, inspected, or versioned.

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
The dependency is specified with a lower-bound only (requests>=2.31.0), which allows future unreviewed versions to be installed and also permits installation of the specifically flagged vulnerable 2.31.0 release. In a security research tool that may handle network traffic and credentials, non-reproducible dependency resolution increases supply-chain and patch-management risk.

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
86% confidence
Finding
Using pydantic>=2.7.0 leaves the environment non-reproducible and permits unreviewed upstream changes at install time. While no specific advisory is cited here, unpinned dependencies are a genuine supply-chain hardening weakness because builds can drift unexpectedly 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
86% confidence
Finding
pydantic-settings>=2.2.0 is unpinned, so installations may resolve to different versions over time without explicit review. For software that influences LLM behavior and configuration loading, this can introduce reliability and security regressions through dependency drift.

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
91% confidence
Finding
python-dotenv>=1.0.1 is unpinned and also allows installation of the flagged vulnerable 1.0.1 version. Because dotenv libraries often interact with local configuration and secrets, version drift or use of a vulnerable release can have security consequences beyond simple build instability.

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
95% confidence
Finding
The requirement permits requests 2.31.0, which is associated with multiple advisories including credential leakage and request verification issues. In an MCP/LLM enhancement service that likely makes outbound HTTP requests, these flaws can expose secrets, mishandle trust boundaries, or weaken transport security when interacting with attacker-controlled endpoints.

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
88% confidence
Finding
The requirement permits python-dotenv 1.0.1, which is flagged for symlink-following behavior that can enable arbitrary file overwrite in certain usage patterns. If the service writes .env values or manages environment files on shared or attacker-influenced paths, this could be abused to overwrite unintended files.

Static analysis

No suspicious patterns detected.