Back to skill

Security audit

队列模拟服务

Security checks for vulnerabilities and agentic risk

Overview

This queue-simulation skill needs review because it collects and stores a Xiaobenyang API key, sends work to a remote API, and contains leftover Gaokao-school-query identifiers that do not fit the stated purpose.

Install only if you intentionally want a Xiaobenyang API-backed queue tool, are comfortable providing an XBY_APIKEY, storing it in plaintext .env, and sending queue parameters to mcp.xiaobenyang.com. For ordinary queue simulation, prefer a local implementation that does not require an external key.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill advertises no declared permissions while its documented behavior implies environment access, local file read/write, and outbound network use. This undermines least-privilege review and informed consent, making it easier for a seemingly simple analysis skill to access secrets, persist data, or call external services without clear disclosure.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared purpose is local queue simulation/analysis, but the documented behavior includes contacting an external API, loading and persisting credentials, and depending on a third-party service unrelated to the stated function. This mismatch is dangerous because users may disclose secrets or approve execution under false assumptions about what the skill actually does.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The document claims to provide queue simulation, but its workflow and structure pivot to a gaokao/school-query API skill. That kind of domain-switching inconsistency is a strong indicator of deceptive packaging, increasing the risk that the skill is harvesting API keys or routing users to an unrelated external service.

Intent-Code Divergence

Medium
Confidence
92% confidence
Finding
The statement that code 'only calls APIs' conflicts with the listed capabilities for theoretical calculations and simulation, which should be locally computable. Such contradictions prevent accurate risk assessment and may conceal where processing actually occurs and what data is transmitted externally.

Intent-Code Divergence

High
Confidence
97% confidence
Finding
The return-value and project-structure sections contradict the earlier queue-tool documentation and revert to external API/raw-response handling and a different skill directory. This suggests copy-pasted or intentionally misleading instructions that could cause the agent to expose unfiltered third-party data and interact with unrelated code paths.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
A queue simulation skill should not need the user to provide an external website API key and persist it locally. In this context, the credential-collection requirement is especially suspicious because it is unrelated to the declared purpose and creates a direct path to secret harvesting and long-term storage.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
This configuration module is clearly inconsistent with the declared queue-simulation skill: it references a different product domain, hardcodes a remote service base URL and MCP identifier, and implements external credential handling unrelated to M/M/1 or M/M/c analysis. In the context of an allegedly mathematical simulation service, this mismatch strongly suggests hidden repurposed or implanted functionality that could route users toward an unrelated external service and collect credentials.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The code provides persistent storage and runtime management of an external API key even though the skill's stated purpose does not require third-party credential enrollment. In this context, collecting and retaining unrelated API credentials is dangerous because it expands secret exposure and may enable unauthorized use of a user's key or covert access to an external service.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The module docstring identifies itself as configuration for a different 'Gaokao' skill, directly conflicting with the declared queue-simulation service. This discrepancy is a supply-chain red flag because it indicates code reuse from an unrelated project or intentional mislabeling, both of which undermine trust and can conceal unauthorized behavior.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
All exported queue-analysis functions forward user-supplied parameters to an external API via call_api while presenting themselves as local analytical/simulation routines. This creates a trust-boundary and data-flow mismatch: users may disclose inputs or rely on deterministic local behavior when the skill is actually delegating processing to a remote service, which can affect confidentiality, integrity, availability, and auditability.

Intent-Code Divergence

Medium
Confidence
91% confidence
Finding
The docstrings claim exact local formulas, SimPy-based simulation, and local validation, but the code only packages arguments and sends them to an external API. This misleading behavior can cause unsafe operational assumptions, such as believing results are reproducible, offline, or privacy-preserving, when they depend on an opaque remote backend.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The function silently writes an API key into a local .env file and updates the process environment without any user-facing warning, consent flow, or discussion of persistence risk. Persisting secrets this way can surprise users, leave credentials on disk, and increase the chance of accidental disclosure through backups, logs, or source-control mistakes.

Ssd 3

Medium
Confidence
95% confidence
Finding
The skill instructs the agent to collect a user-provided API key, store it, and then continue operating, which creates obvious secret-handling risk. In combination with instructions to display raw results, this increases the chance of accidental disclosure of credentials or other sensitive response fields through natural-language output.

Ssd 3

Medium
Confidence
96% confidence
Finding
The instruction to directly show processed raw API response data to the user without redaction is unsafe because upstream responses may include tokens, internal identifiers, debugging fields, or other sensitive content. Raw passthrough also weakens trust boundaries by exposing users to unvalidated third-party output.

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
93% confidence
Finding
The code explicitly forces reading a specific API key from .env outside normal settings handling, targeting a secret unrelated to the declared queue-simulation function. In this skill context, directly scanning local secret files for a third-party credential is dangerous because it suggests deliberate credential collection for an external service that users would not expect.

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
93% confidence
Finding
Creating a direct Path to .env and reading it manually is part of a bespoke credential-access path rather than ordinary configuration use. Given the skill's declared purpose, this targeted access to local secret storage materially increases suspicion of hidden credential collection and unauthorized external-service enablement.

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 expressly designed to save an external API key into a .env file, creating durable local secret storage for a service unrelated to queue simulation. In this context, it increases the risk of credential compromise and strongly indicates unauthorized secret collection/persistence functionality embedded in an unrelated skill.

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 function advertises setting and persisting an API key to .env, exposing that the skill includes a deliberate secret-retention workflow not justified by its stated queue-analysis purpose. Such hidden credential onboarding in an unrelated skill is dangerous because users may unknowingly authorize another service and leave reusable secrets on disk.

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 dependency is specified with a lower bound only, which allows builds to resolve to different versions over time and weakens reproducibility and supply-chain control. In a server-side MCP skill, this can lead to unexpected adoption of vulnerable or breaking releases and makes auditing harder.

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
Using an unpinned pydantic version permits arbitrary newer releases to be installed, reducing determinism and increasing supply-chain risk. For an MCP server that parses external inputs, this can introduce unreviewed behavior changes or newly disclosed vulnerabilities.

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
93% confidence
Finding
The pydantic-settings dependency is not pinned, so installation may pull in different versions across environments. This is a supply-chain hygiene issue that can complicate security review and expose the service to regressions or vulnerable transitive combinations.

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 dependency allows uncontrolled upgrades, which is undesirable for a server component that may load environment-based configuration. This increases the chance of pulling in vulnerable or incompatible versions and undermines reproducible deployments.

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
97% confidence
Finding
The requirement allows requests 2.31.0, a version with published advisories, and the static finding identifies known issues including credential leakage and request verification problems. In an MCP server, outbound HTTP is common, so if this library is used for external requests, these flaws could affect confidentiality or transport security depending on code paths.

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
85% confidence
Finding
The requirement permits python-dotenv 1.0.1, which is flagged for a symlink-following file overwrite issue in set_key. This is only exploitable if the skill uses the vulnerable API on attacker-influenced paths, so the practical risk depends on application usage, but keeping a known vulnerable version range is still unsafe.

Static analysis

No suspicious patterns detected.