Back to skill

Security audit

时间协议服务

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be advertised as a time/timezone helper but includes unrelated remote API, credential collection, and local secret persistence behavior that users should review carefully.

Install only if you are comfortable with a skill that may contact a third-party service and handle an API key despite being presented as a time/timezone tool. Do not provide sensitive or reusable credentials, and review or remove the .env persistence and generic remote-call code before use.

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
95% confidence
Finding
The skill declares a simple time/timezone function, but its instructions reveal capabilities to read environment variables, write local configuration, and access a remote network API without any declared permissions boundary. That creates hidden data-flow and persistence behavior users and reviewers would not expect from a local utility skill, increasing the risk of secret handling and exfiltration.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
This is a strong description-behavior mismatch: a purported local time conversion skill actually instructs the model to obtain, store, and use an API key for a third-party service. Such mismatch is dangerous because users may disclose credentials or permit networked actions under false assumptions about the skill's scope and trust model.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
Requiring an external API key for basic time and timezone operations is unnecessary and expands the attack surface beyond the declared local-purpose functionality. It introduces credential collection, remote data transfer, and dependency risk where none should be needed for this class of task.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
The workflow includes an example calling an unrelated search_schools function, suggesting the skill content may have been copied from another project without proper review. This inconsistency undermines trust in the documented behavior and raises the possibility of unintended tool routing or hidden capabilities beyond the stated time-service purpose.

Intent-Code Divergence

Low
Confidence
90% confidence
Finding
The project structure references a gaokao-related directory name, which conflicts with the claimed time service identity and indicates probable repurposing from another skill. While not directly exploitable by itself, this provenance mismatch is a supply-chain warning sign that the package may contain undocumented behavior or poorly reviewed leftovers.

Description-Behavior Mismatch

High
Confidence
96% confidence
Finding
The skill metadata says it only provides time and timezone conversion, but this file exposes a generic remote tool-invocation client that can call arbitrary upstream MCP tools by passing attacker-controlled tool_name, mcp_id, and params. This creates a capability/description mismatch that can hide broader network-enabled behavior from reviewers and users, increasing the risk of unauthorized actions, data exfiltration, or invoking unintended remote functionality.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
For a narrowly described time/timezone service, adding a reusable outbound HTTP client with retry support enables broader network interaction than is operationally necessary. Even if the base URL is configured centrally, this generic capability expands the attack surface and can be repurposed to reach sensitive upstream services or perform actions beyond the advertised skill scope.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The file implements configuration and credential handling for an unrelated external service ('高考' / xiaobenyang API) inside a skill advertised as only providing time and timezone conversion. This capability expansion is dangerous because it introduces secret handling and external-service integration that are not justified by the stated purpose, increasing the risk of hidden data exfiltration or unauthorized outbound access.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The functions save_api_key_to_env, set_api_key, and get_api_key give the skill the ability to persistently store and manage an external API key, which is unrelated to a time service. In this context, persistent secret management is risky because it can retain sensitive credentials on disk and enable the skill to authenticate to third-party services beyond its declared scope.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
The class docstring identifies the code as '小笨羊高考Skill配置', which conflicts with the declared skill name and purpose of a time protocol service. This mismatch is a strong indicator of repurposed or misleading code, making the surrounding credential-handling behavior more suspicious and harder to trust during review.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The code writes the provided API key directly into a local .env file without any visible warning, consent flow, or security controls. This is dangerous because users or operators may assume the secret is only used in memory, while it is actually persisted to disk where it may be exposed through backups, source control mistakes, or local compromise.

Ssd 3

Medium
Confidence
97% confidence
Finding
The skill explicitly instructs the model to ask the user for an API key and persist it locally, creating a conversational mechanism to collect and retain sensitive secrets. This is dangerous because it normalizes secret disclosure to the model layer and increases the risk of accidental logging, unauthorized reuse, local compromise, or later exfiltration.

Credential Access

High
Category
Privilege Escalation
Content
model_config = SettingsConfigDict(
        env_prefix="XBY_GAOKAO_",
        env_file=".env",
        env_file_encoding="utf-8",
        extra="ignore",
    )
Confidence
88% confidence
Finding
Configuring automatic loading from .env enables the skill to access locally stored secrets, which is sensitive behavior in a skill whose declared purpose is only time and timezone conversion. In this context, credential access is not justified and broadens the trust boundary unnecessarily.

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 model_post_init method forcibly reads .env and searches specifically for XBY_APIKEY, bypassing normal configuration patterns to extract a credential. This is more dangerous than generic config loading because it intentionally targets a secret associated with an unrelated external service, suggesting unnecessary and potentially covert credential access.

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
Reading the .env file content directly gives the code raw access to locally stored secrets. In a time service, this direct credential-reading behavior is unjustified and creates a path for unauthorized use of secrets from the host environment.

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
90% confidence
Finding
The code explicitly reads XBY_APIKEY from the environment and assigns it into the settings object, enabling use of an unrelated secret by this skill. Accessing environment secrets in this context enlarges the attack surface and could facilitate unauthorized external API use if other code paths consume the value.

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
97% confidence
Finding
The save_api_key_to_env function is dedicated to persisting a credential into .env, confirming that the skill can both access and retain secrets locally. For a time/timezone service, such credential-handling capability is unnecessary and materially raises the risk of secret leakage or misuse.

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
The set_api_key function formalizes accepting and persisting an API key to .env, operationalizing secret management for an unrelated external service. This is dangerous because it normalizes storing sensitive credentials on disk and enables capability creep well beyond the skill's declared function.

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 constraint (`requests>=2.31.0`) rather than being pinned to a specific version, which makes builds non-reproducible and can unexpectedly pull in a vulnerable or breaking release. In a security-sensitive service component, this weakens supply-chain control and complicates auditing and incident response.

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 `pydantic>=2.7.0` allows any newer version to be installed, which can introduce unreviewed code, breaking changes, or newly disclosed vulnerabilities into the runtime environment. While not an immediate exploit by itself, it is a genuine supply-chain hygiene weakness.

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` is unpinned, so deployments may resolve to different versions over time. This increases supply-chain risk and reduces reproducibility, making it harder to verify the exact code being executed.

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
`python-dotenv>=1.0.1` permits any future version, creating non-deterministic installs and potentially introducing insecure or incompatible updates without review. This is especially relevant because the package also has an advisory noted separately.

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
93% confidence
Finding
The requirement allows installation of `requests` 2.31.0, and that version is associated with multiple advisories, including credential leakage and request verification issues. Even though the line uses `>=` rather than `==`, the vulnerable version is still within the allowed range, so environments may resolve to or remain on an affected release.

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
88% confidence
Finding
The dependency constraint permits `python-dotenv` 1.0.1, which is flagged for a symlink-following issue in `set_key` that can lead to arbitrary file overwrite in affected usage patterns. The skill context describes a time/timezone service, so exploitation is less likely unless the code actually uses `set_key` on attacker-influenced paths, but the vulnerable version remains an avoidable risk.

Static analysis

No suspicious patterns detected.