Back to skill

Security audit

时区管理服务

Security checks for vulnerabilities and agentic risk

Overview

This timezone skill is not clearly malicious, but it needs Review because it sends requests through a third-party service, stores an API key in plaintext, and contains mismatched copied school-admissions identifiers.

Install only if you trust xiaobenyang.com with the XBY API key and your timezone queries. Treat the key as a secret because the skill stores it in a local .env file; avoid shared or committed workspaces, and prefer a short-lived or low-privilege key if available. The copied gaokao references should be fixed by the publisher before this is treated as a routine timezone utility.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill declares no permissions while its documented behavior requires environment access, file reads/writes, and network communication. This undermines informed consent and sandboxing expectations, especially because it also instructs persistence of a user-supplied API key to local configuration.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The skill is presented as a comprehensive timezone-management service, but the documentation shows it is actually a client/proxy for an external third-party service and requires collecting and storing a vendor-specific API key. This mismatch can mislead users about data flow, trust boundaries, and secret handling, increasing the risk of credential exposure or unauthorized external transmission.

Intent-Code Divergence

Medium
Confidence
89% confidence
Finding
The workflow includes an example call to `search_schools(...)`, which is unrelated to timezone conversion and suggests the documentation was copied from a different skill. Such inconsistencies are dangerous because they indicate poor provenance and raise the possibility that hidden logic, endpoints, or data handling may not match the stated purpose.

Intent-Code Divergence

Low
Confidence
84% confidence
Finding
The project structure refers to `xiaobenyang_gaokao_skill`, which contradicts the claimed timezone-service identity. While not directly exploitable on its own, this inconsistency is a supply-chain red flag that the package may contain reused or mispackaged components with unintended behavior.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The configuration class clearly references a different skill/domain ("小笨羊高考Skill") than the declared timezone-management service, which is a strong supply-chain integrity red flag. A mismatched identity suggests code reuse, mispackaging, or hidden functionality, reducing trust and increasing the chance that unrelated or unsafe behavior is being shipped under a benign manifest.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
This skill persists and manages an external API key even though the manifest describes only timezone management and time conversion, functionality that normally does not require a third-party credential. That mismatch expands the trust boundary unnecessarily and may enable data exfiltration or unauthorized remote calls under a misleading capability description.

Intent-Code Divergence

High
Confidence
99% confidence
Finding
The settings docstring identifies the component as a different skill than the one advertised, directly contradicting the manifest. Identity inconsistencies are dangerous because they indicate tampering, repurposed code, or incomplete review, all of which undermine the operator's ability to assess what the skill actually does.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The code writes the API key to a local .env file without any visible consent flow, warning, or disclosure. Persisting secrets silently increases the risk of credential leakage through source control, backups, shared workspaces, or later compromise of the host environment.

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
86% confidence
Finding
The code forcefully reads .env manually in model_post_init to extract a specific API key, bypassing the normal settings abstraction and targeting a credential unrelated to the declared timezone feature set. In context, this bespoke secret-reading behavior is suspicious because it adds credential handling outside expected functionality and can conceal undeclared remote-service use.

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
86% confidence
Finding
Checking for the existence of .env and then reading it directly is part of custom credential extraction logic. In this skill context, the issue is not the file access alone but the deliberate retrieval of a specific API key for an apparently unrelated service, which broadens attack surface and trust assumptions.

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
The helper explicitly saves an API key into .env, creating durable secret storage in a flat file. In the context of a timezone skill with no obvious need for such credentials, this persistence is unjustified and increases the chance of accidental disclosure through repository commits, filesystem access, or logs/backups.

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
88% confidence
Finding
The set_api_key function is designed to persist credentials to .env as part of normal operation, embedding secret retention into the module API. That behavior is risky because it normalizes long-lived plaintext credential storage for functionality not justified by the skill's declared purpose.

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
96% confidence
Finding
The dependency is specified with a lower-bound version constraint instead of an exact pin, which makes builds non-reproducible and can silently pull in newer package versions with breaking changes or newly introduced supply-chain risk. In security-sensitive deployments, unpinned dependencies reduce control over what code is actually installed.

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
96% confidence
Finding
Using `pydantic>=2.7.0` allows any later major-compatible release to be installed, which can change behavior over time and weakens software supply-chain integrity. This is a real dependency management weakness even if it is not an immediately exploitable code flaw by 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
96% confidence
Finding
`pydantic-settings>=2.2.0` is unpinned, so future installs may resolve to different versions than were originally tested. That creates avoidable operational and supply-chain risk because dependency contents can change 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
97% confidence
Finding
The `python-dotenv>=1.0.1` requirement is not fixed to a single version, so installations are not reproducible and may unexpectedly consume newer releases. This increases supply-chain uncertainty and can expose the project to unreviewed dependency changes.

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
93% confidence
Finding
The requirement permits installation of `requests` 2.31.0, a version with published advisories including credential leakage via malicious URLs and session verification issues. Although the file does not prove the vulnerable code paths are exercised, allowing a known vulnerable version in a network-capable service is a real risk, especially because this skill likely interacts with external systems or user-supplied data.

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
87% confidence
Finding
The dependency specification allows `python-dotenv` 1.0.1, which has an advisory for symlink-following in `set_key` that could enable arbitrary file overwrite in affected usage patterns. This is context-dependent and only becomes exploitable if the application invokes the vulnerable function on attacker-influenced paths, but it remains a genuine dependency risk.

Static analysis

No suspicious patterns detected.