Back to skill

Security audit

域名检查服务

Security checks for vulnerabilities and agentic risk

Overview

This domain-checking skill is not clearly malicious, but it automatically stores a user API key in a local plaintext .env file and contains inconsistent leftover school-search/Gaokao references that warrant review before installation.

Review this skill before installing. Only use it if you are comfortable giving XiaoBenYang an API key and having that key stored in a plaintext .env file in the skill working directory. Prefer setting XBY_APIKEY through your own secret manager or environment instead of letting the skill persist it, and verify the publisher has corrected the leftover Gaokao/search_schools documentation and dependency pinning.

Vulnerability Patterns
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill advertises capabilities that imply reading environment variables, writing files, and making network requests, yet it declares no permissions or equivalent disclosure. This undermines informed consent and makes it easier for a user or hosting platform to invoke a skill that can access sensitive data and persist secrets unexpectedly.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The documented purpose is a narrow domain-registration checker, but the behavior includes credential collection and persistence to .env, reading secrets from environment/files, and references to broader tool-calling behavior unrelated to that purpose. This mismatch is dangerous because users may disclose an API key believing they are enabling a simple checker while the skill has broader secret-handling and potentially reusable execution capabilities than advertised.

Description-Behavior Mismatch

Medium
Confidence
88% confidence
Finding
The documentation mixes a domain-checking service with unrelated gaokao school-search workflow and project naming, indicating the skill may be repurposed from another project without proper review. Such inconsistency increases the risk that users or agents invoke the wrong tools, send data to unintended endpoints, or expose secrets to components outside the claimed use case.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
The required tool-call example instructs the model to call a school-search function even though the only declared tool is a domain-checking function. This contradiction can cause an agent to invoke unintended code paths or reveal user data to the wrong backend, especially in systems that rely heavily on documentation-guided tool routing.

Context-Inappropriate Capability

Medium
Confidence
86% confidence
Finding
代码将凭据写入本地 .env 文件并缓存到进程环境变量,形成持久化敏感信息存储。对于一个域名检查类技能,这种本地凭据落盘能力会扩大凭据泄露面,尤其在共享主机、源码目录被打包、日志或备份被访问时更危险。

Missing User Warnings

Medium
Confidence
93% confidence
Finding
API key 被静默写入 .env 和进程环境,且没有任何用户提示、确认或凭据持久化告知。用户可能误以为密钥仅用于当前会话,实际却被长期保留,从而在代码仓库提交、备份、文件同步或本地多用户环境中泄露。

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
88% confidence
Finding
model_post_init 中强制读取 .env 里的 XBY_APIKEY,绕过了更透明的标准配置流,增加了对本地明文凭据文件的依赖。对一个域名检查技能而言,这种主动读取本地凭据文件的行为会扩大敏感信息接触面,也使代码功能与声明用途更不匹配。

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
88% confidence
Finding
代码检查 .env 是否存在并随后读取内容,属于对本地凭据文件的主动访问。虽然未见外传逻辑,但它会让技能具备接触和处理明文密钥的能力,在上下文不充分时应视为不必要的敏感操作。

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
94% confidence
Finding
save_api_key_to_env 明确实现了将 API key 写入 .env 的能力,这会在磁盘上留下明文凭据。若目录权限过宽、文件被纳入版本控制、备份或部署产物,攻击者可直接获取可用密钥。

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
91% confidence
Finding
set_api_key 将“设置密钥”与“持久化到 .env”绑定,导致调用方很容易在不知情的情况下把敏感信息长期保存到本地。该设计放大了误用风险,并使一个看似简单的配置接口实际承担了凭据落盘行为。

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 only (`requests>=2.31.0`), which allows future unreviewed versions to be installed and makes builds non-reproducible. In security-sensitive tooling that performs network operations, this increases supply-chain and stability risk because dependency behavior can change without deliberate 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
94% confidence
Finding
`pydantic>=2.7.0` is unpinned, so the environment may resolve to different versions over time. This weakens reproducibility and can introduce unexpected vulnerabilities or breaking changes into the skill without code 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
94% confidence
Finding
`pydantic-settings>=2.2.0` permits unbounded upgrades, which is a common supply-chain hygiene issue. While not an immediate exploit by itself, it increases the chance that a later vulnerable or incompatible version is silently 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
95% confidence
Finding
`python-dotenv>=1.0.1` is unpinned, creating non-deterministic installs and potential exposure to future vulnerable releases. Because this package often interacts with local configuration files, uncontrolled upgrades can have security consequences beyond simple compatibility issues.

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 allowed dependency range includes `requests` 2.31.0, which has multiple published advisories, including issues related to credential leakage and TLS verification behavior. Because this skill is a domain-checking service that likely makes outbound HTTP requests, vulnerable `requests` behavior is more relevant than in an offline utility and could affect network interactions or secrets handling if unsafe request patterns are present elsewhere in the skill.

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 dependency specification permits installation of `python-dotenv` 1.0.1, which is flagged with an advisory involving symlink following in `set_key` and possible arbitrary file overwrite. This is only directly exploitable if the skill uses the affected functionality in a context where attackers can influence target paths or filesystem state, so the dependency issue is real but the practical impact from this file alone appears limited.

Static analysis

No suspicious patterns detected.