Back to skill

Security audit

苹果开发者文档搜索服务

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed third-party Apple documentation search wrapper, but users should understand it stores and sends a XiaoBenYang API key and queries to that service.

Install only if you are comfortable using XiaoBenYang as the backend for Apple documentation searches. Use a dedicated API key if possible, keep the generated .env file out of source control, and consider deleting or rotating the key when you stop using the skill.

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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (17)

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill documentation describes capabilities that read environment variables, write to local configuration, and make network requests, but it does not declare corresponding permissions. This creates a transparency and consent problem: a user or platform may believe the skill is read-only documentation search when it can also persist secrets locally and contact external services.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill claims to access Apple developer documentation, but the instructions show it actually collects an API key, stores it in a local .env-style configuration, and routes requests through a third-party XiaoBenYang service rather than directly to Apple. This mismatch can mislead users about where their queries and credentials go, increasing the risk of credential disclosure, unexpected data sharing, and trust abuse.

Intent-Code Divergence

Medium
Confidence
84% confidence
Finding
The workflow example references an unrelated 'search_schools'/'gaokao' style tool pattern, which is inconsistent with the Apple documentation skill. Such cross-skill contamination is a supply-chain red flag because it suggests the documentation may have been copied from another project, increasing the chance that users or agents invoke unintended tools or mishandle data.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The documented project structure names the package 'xiaobenyang_gaokao_skill', which contradicts the stated Apple developer documentation purpose. This inconsistency undermines provenance and trust, and may indicate the skill was repurposed from unrelated code that could contain unexpected behavior, dependencies, or data flows.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The skill claims to search Apple developer documentation, but the configuration code reads, stores, and exposes an unrelated XBY_APIKEY for a different service. This mismatch is dangerous because it can mislead users into supplying credentials unrelated to the declared function of the skill, enabling covert credential collection or unauthorized use of another backend.

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The code comments, env prefix, and identifiers describe a different skill ('高考' / XBY_GAOKAO) than the manifest's Apple developer documentation service. Such identity mismatch is a strong supply-chain integrity problem because it indicates code reuse from an unrelated project or deceptive packaging, making it easier to hide unexpected data flows or credential handling.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The function persists the provided API key into a local .env file and also places it into process environment variables without any warning, consent, or discussion of storage scope. This creates unnecessary secret exposure risk because .env files are commonly readable by local users, accidentally committed to source control, or included in logs/backups.

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
91% confidence
Finding
The code explicitly forces reading XBY_APIKEY from the .env file for an unrelated service despite the skill presenting itself as an Apple documentation search tool. In this context, explicit secret retrieval is dangerous because it expands access to credentials users would not reasonably expect this skill to need.

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
90% confidence
Finding
Reading the .env file contents directly to extract XBY_APIKEY bypasses more structured configuration handling and enables direct access to locally stored secrets. Given the mismatch between claimed purpose and actual credential targeted, this behavior increases the risk of undisclosed credential collection from the host environment.

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
90% confidence
Finding
This function is explicitly designed to save an API key into a .env file, creating a durable local copy of a secret. In a skill whose stated purpose does not justify handling this credential, persistent storage materially increases the chance of accidental disclosure through source control, backups, filesystem access, or mispackaging.

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
89% confidence
Finding
The helper advertises persistence of the API key to .env as normal behavior, normalizing long-term storage of a secret for a skill that appears unrelated to that service. This can mislead operators into granting and retaining unnecessary credentials, increasing exposure 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
97% confidence
Finding
The dependency is specified with a lower-bound only (`requests>=2.31.0`), which permits installation of any future version and weakens build reproducibility and supply-chain control. In a security-sensitive skill that performs external documentation access over the network, unpinned dependencies increase the chance of unintentionally pulling a compromised or incompatible release.

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
`pydantic>=2.7.0` is unpinned, so environments may resolve to different future versions with unknown security or compatibility properties. This is a supply-chain hygiene issue rather than an immediate exploit, but it can make builds non-reproducible and increase exposure to newly introduced flaws.

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
`pydantic-settings>=2.2.0` allows unconstrained future upgrades, which can introduce unreviewed code into the environment and reduce reproducibility. Because this package often handles configuration and environment-derived settings, unexpected behavior changes may affect how secrets or endpoints are loaded.

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
97% confidence
Finding
`python-dotenv>=1.0.1` is unpinned, permitting arbitrary future versions to be installed and undermining reproducibility. Since this library influences environment-variable loading, unreviewed upgrades can have security implications around configuration handling.

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
99% confidence
Finding
The dependency floor explicitly allows `requests==2.31.0`, a version flagged with multiple advisories, so deployments may resolve to a known vulnerable release. Because this skill is designed to access remote Apple developer content over the network, flaws in an HTTP client can directly affect request handling, credential usage, redirect behavior, or TLS verification, making the context more relevant than for an offline-only tool.

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
92% confidence
Finding
The requirement permits `python-dotenv==1.0.1`, which is reported as affected by a symlink-following arbitrary file overwrite issue in `set_key`. This is only exploitable if the skill actually invokes the vulnerable write path on attacker-influenced `.env` targets, so the risk is contextual and lower from this file alone, but it remains a real dependency exposure.

Static analysis

No suspicious patterns detected.