Back to skill

Security audit

AntV文档协议服务

Security checks for vulnerabilities and agentic risk

Overview

This AntV helper appears to be an external documentation lookup tool, but it saves an API key in a local .env file and sends user queries to a third-party service with limited disclosure.

Install only if you are comfortable sending AntV questions and related project details to xiaobenyang's MCP service and storing that service's API key in a plaintext .env file. Prefer using a dedicated low-privilege API key, check the .env file after use, and avoid including proprietary code, secrets, or sensitive architecture details in queries.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill declares no permissions while its documented behavior includes reading environment variables, persisting secrets to local files, and making outbound network calls. This undermines informed consent and platform policy enforcement because a user or reviewer cannot accurately assess the skill's real capabilities before use.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The skill claims to be a documentation/context server for AntV, but its instructions also require collecting, storing, and reusing an API key and contacting a third-party service. This description-behavior mismatch is dangerous because it can mislead users into sharing credentials and granting trust under false assumptions about the skill's scope and data handling.

Intent-Code Divergence

Medium
Confidence
84% confidence
Finding
The workflow example references unrelated gaokao/school-search tooling inside a skill presented as an AntV documentation assistant. This inconsistency increases the risk of wrong-tool invocation, unintended data flow, or hidden reuse of unrelated code paths, which weakens user trust and reviewer ability to verify what the skill actually does.

Intent-Code Divergence

Low
Confidence
78% confidence
Finding
The documented project structure names a different project ('xiaobenyang_gaokao_skill'), which suggests the skill may be repackaged from unrelated code. While not proof of exploitation, this kind of provenance confusion can conceal unintended functionality and makes security review materially harder.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
This module adds API key persistence by writing secrets into a local .env file, which is broader capability than a read-only documentation context service typically needs. Persisting credentials on disk increases exposure through accidental commit, insecure file permissions, workspace leakage, or later reuse by unrelated code.

Context-Inappropriate Capability

Medium
Confidence
88% confidence
Finding
For a skill described as providing AntV documentation context and examples, implementing local credential storage is not clearly justified by the stated functionality. That mismatch raises risk because secret-handling code expands the attack surface and can enable unintended collection or retention of user credentials.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill instructs the agent to ask the user for an API key and save it locally, but does not disclose persistence, storage location, retention, or associated credential risks. This is dangerous because users may reveal secrets without informed consent, and local persistence can expose credentials to other processes, users, or future sessions.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The code writes an API key to .env automatically without any user-facing warning, confirmation, or disclosure of persistence. Silent persistence of secrets is dangerous because users may assume keys are ephemeral while the program leaves recoverable credentials on disk.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The function forwards raw user query content to an external API via call_api without any visible consent, minimization, or disclosure mechanism in this file. In a documentation-assistant skill, user queries may contain proprietary source details, internal architecture, or sensitive debugging context, so silent transmission creates a real privacy and data-handling risk.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
This wrapper sends user-supplied query text, topic, intent, and potentially subTasks to an external service, again with no visible warning or privacy guardrails in the tool layer. Because subtasks may decompose a user's project work into detailed implementation steps, the external transmission can expose sensitive business logic or internal code context beyond what the user expects.

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
84% confidence
Finding
The code explicitly and forcibly reads XBY_APIKEY from a local .env file outside the normal settings flow, indicating deliberate secret loading logic. In the context of a documentation service, this increases sensitivity because the skill is handling credentials directly and retaining them from disk without clear necessity.

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
84% confidence
Finding
Opening and reading the entire .env file to locate an API key is direct credential access logic. Even without exfiltration shown here, this broadens the module's responsibility from simple configuration to local secret retrieval, which is riskier than necessary for the declared skill purpose.

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
91% confidence
Finding
This function is dedicated to saving an API key into .env, creating plaintext credential persistence on local storage. If the workspace is shared, backed up, logged, or committed, the key can be exposed and misused.

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
90% confidence
Finding
This function explicitly advertises setting and persisting the API key to .env, confirming that credential storage is a first-class feature of the module. Given the skill's stated role as a documentation context service, this makes the behavior less justified and therefore more concerning.

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 only a lower bound, which allows future installs to resolve to different versions over time. This weakens build reproducibility and can unintentionally introduce breaking changes or newly disclosed vulnerable 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 pydantic version means dependency resolution may change across installations, making builds non-reproducible. This can cause accidental adoption of insecure or incompatible versions without any code change in the skill itself.

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 pydantic-settings dependency permits installer-selected versions to drift over time. That creates supply-chain and stability risk because future resolved versions may contain vulnerabilities or behavior 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
95% confidence
Finding
Leaving python-dotenv unpinned allows future installations to pull different releases, reducing reproducibility and potentially importing a vulnerable version. In a service-oriented skill, configuration-loading libraries are commonly present at startup, so dependency drift can affect the whole runtime.

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
Although the file uses a lower-bound specifier, it explicitly permits installation of requests 2.31.0, which is affected by multiple published advisories. In a model-context protocol server that may fetch remote resources or process attacker-influenced URLs, a vulnerable HTTP client can expose credentials or weaken transport verification depending on how the library is used.

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
86% confidence
Finding
The version range allows installation of python-dotenv 1.0.1, which is reported as vulnerable to symlink-following in set_key and can lead to arbitrary file overwrite in affected usage patterns. For an AI service that may manage environment files or local configuration, this becomes more dangerous if any workflow modifies .env files on disk using untrusted paths or repository content.

Static analysis

No suspicious patterns detected.