Back to skill

Security audit

文本转换工具

Security checks for vulnerabilities and agentic risk

Overview

This skill presents as a simple text converter but requires an external API key, stores it locally, and sends text to a third-party API for operations that should normally be local.

Review before installing. Only use this skill if you are comfortable giving it a Xiaobenyang API key, storing that key in a local .env file, and sending all submitted text to a third-party API. Avoid using it for sensitive text unless the publisher clearly documents the endpoint, retention policy, and why remote processing is required.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill advertises simple local text transformations, yet the documentation indicates capabilities to read environment variables, read/write .env, and access the network without declaring corresponding permissions. This hidden capability expansion is dangerous because it can enable credential collection and outbound data transfer under a misleadingly low-risk description.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
There is a strong description-behavior mismatch: a 'text conversion tool' should not need an API key, persistent secret storage, or remote API access. This mismatch undermines informed consent and can trick users or reviewers into approving a skill that has much broader data access and execution behavior than advertised.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The documentation section requiring an API key and directing users to an unrelated external service is inconsistent with the stated text-processing purpose. In context, this looks like deceptive repurposing of the skill to collect credentials or redirect usage to a different service, which materially increases risk.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The workflow and return-value handling show the model acting as a router for external API-backed tools rather than performing local text transformation. That is dangerous because users may submit arbitrary text expecting local processing while the skill actually forwards content to remote infrastructure and exposes a larger attack surface.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The workflow examples conflict with the claimed purpose and include an example unrelated to text conversion, suggesting copied or repurposed instructions. Such inconsistencies are a security concern because they indicate the skill may invoke unintended tools or routes and that reviewers cannot trust the declared behavior.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
For a basic text transformation skill, collecting and persisting an API key is unnecessary and out of scope. In this context, the secret collection requirement is especially dangerous because it normalizes requesting credentials for a task that should not need them, creating phishing and secret-exfiltration risk.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The skill claims to be a local text transformation tool, but this code implements a generic remote MCP API invoker that can send arbitrary tool names and parameters to an upstream service. That capability is materially broader than the stated purpose and can be used as a disguised proxy for unauthorized external actions, data exfiltration, or invocation of unrelated remote tools.

Context-Inappropriate Capability

High
Confidence
96% confidence
Finding
A text conversion skill should not need broad outbound network access plus API-key-authenticated remote execution. The combination of user-controlled `tool_name`, `params`, and externally supplied `mcp_id` with authenticated requests enables misuse of privileged credentials to access remote services unrelated to the declared functionality, increasing the risk of covert capability expansion and sensitive data leakage.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The skill explicitly reads an external API credential from .env and environment variables, persists it back to .env, and exposes helper functions for setting and retrieving it. For a skill advertised as simple text conversion, this is dangerous because it introduces secret handling and remote-service access that users would not reasonably expect, increasing the risk of credential misuse, leakage, or unauthorized network-backed behavior.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The manifest describes a local text transformation tool, but the code configures a remote base URL, MCP identifier, and API key persistence. This mismatch is security-significant because users and reviewers may authorize or run the skill under false assumptions, while the code is prepared for remote authenticated interactions unrelated to the stated purpose.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
The class docstring identifies a different purpose (高考-related skill) than the manifest's text-conversion description. While not an exploit by itself, this inconsistency is a strong trust and provenance red flag that can hide copied or repurposed code paths with unrelated capabilities, including credentialed remote access.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The skill is presented as a local text-conversion utility, but every function forwards user-supplied text to an external API via call_api. This creates an undisclosed data exfiltration/privacy risk, especially because users may reasonably expect simple transformations like lowercase or reverse to happen locally and may pass sensitive text into the tool.

Intent-Code Divergence

Low
Confidence
87% confidence
Finding
The docstrings state the functions return null, but the code actually returns the response from call_api. This mismatch can mislead reviewers and users about the tool's real behavior, obscuring that it depends on a remote service and potentially causing unsafe assumptions in downstream code or security review.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The code silently writes the provided API key to a plaintext .env file and sets it in the process environment without any user-facing warning, consent, or disclosure. This creates a realistic risk of long-lived credential exposure through source directories, backups, logs, misconfigured file permissions, or accidental 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
95% confidence
Finding
The code forcibly reads XBY_APIKEY directly from .env using custom parsing, bypassing the declared env_prefix-based configuration model. In the context of a supposedly simple text-conversion skill, this is dangerous because it adds undisclosed credential access logic and makes secret handling less auditable and easier to misuse.

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
95% confidence
Finding
Initializing a Path to .env is part of a custom routine that directly accesses project-local secrets for this skill. In isolation the line is harmless, but within this code path it participates in undisclosed credential access inconsistent with the advertised functionality.

Credential Access

High
Category
Privilege Escalation
Content
if line.startswith("XBY_APIKEY="):
                    self.api_key = line.split("=", 1)[1].strip()
                    break
        # 如果环境变量有值,覆盖 .env 的值
        env_val = os.getenv("XBY_APIKEY", "")
        if env_val:
            self.api_key = env_val
Confidence
94% confidence
Finding
Reading XBY_APIKEY from the environment and overriding the .env value is another credential-access path. This is risky here because the skill's declared purpose does not justify secret collection, and multiple secret sources complicate auditing and can mask where credentials are coming from.

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
96% confidence
Finding
The function is dedicated to saving an API key into a plaintext .env file, creating persistent local secret storage in the skill directory. This materially increases the chance of credential leakage through accidental commits, insecure backups, shared workspaces, or permissive file 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
95% confidence
Finding
This function wraps credential setting and persistence as a first-class capability of the skill. In context, that indicates the skill is designed to manage external service credentials despite presenting itself as a text converter, making the mismatch and secret-handling risk more serious.

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 constraint only, which allows future installations to resolve to different versions over time. This weakens reproducibility and can unintentionally introduce vulnerable or breaking releases through normal dependency resolution or supply-chain compromise.

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 a non-pinned version range for pydantic means builds are not reproducible and may silently consume newer releases with security or compatibility regressions. In a supply-chain context, this increases exposure to malicious or compromised upstream 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 strictly pinned, so deployment results may vary across environments and over time. This creates a supply-chain risk because newly published versions can be pulled in without review.

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 python-dotenv dependency allows uncontrolled upgrades at install time, reducing reproducibility and increasing supply-chain exposure. This is especially relevant because the package also has a known advisory affecting the currently referenced minimum version.

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
98% confidence
Finding
The requirements file permits installation of requests 2.31.0 or later, and the static finding correctly notes that 2.31.0 itself carries multiple published advisories. Because the dependency is unpinned, some environments may still install the vulnerable version, and this package is network-facing by nature, which increases the practical risk if the skill makes outbound HTTP requests.

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
97% confidence
Finding
The dependency specification allows installation of python-dotenv 1.0.1, which is reported as vulnerable to symlink-following behavior in set_key that may enable arbitrary file overwrite in affected usage patterns. The skill is a text transformation tool, so this is less dangerous than in a file-management skill, but it remains a real supply-chain risk if dotenv write operations are used anywhere in the project or future changes.

Static analysis

No suspicious patterns detected.