Back to skill

Security audit

菲律宾地理编码服务

Security checks for vulnerabilities and agentic risk

Overview

This skill may provide Philippines geocoding, but it stores an API key locally and routes calls through a broadly scoped third-party MCP-style service with under-disclosed, leftover unrelated configuration.

Install only if you trust xiaobenyang.com with the API key and are comfortable with the key being stored in a local plaintext .env file. Prefer setting XBY_APIKEY through your environment or a managed secret store, and review the generic call_api path and leftover gaokao/template references before using it in a sensitive workspace.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding
The skill declares no permissions while its documented behavior includes reading environment variables, writing to local files, and making network calls. That mismatch weakens user and platform visibility into sensitive capabilities, especially because the skill also handles API secrets and remote service access.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The skill claims to be a Philippines PSGC geocoding service, but the documentation shows additional behavior: collecting an API key, persisting it to .env, and acting as a generic remote tool client for a third-party service. This description-behavior mismatch can mislead users into disclosing secrets and allowing broader capabilities than expected.

Intent-Code Divergence

Medium
Confidence
82% confidence
Finding
The workflow example references an unrelated high-school search function while the skill is presented as a Philippines geocoding service. Such inconsistency is a supply-chain warning sign because it suggests copied template content, poor review hygiene, or possible hidden behavior not reflected in the stated purpose.

Intent-Code Divergence

Low
Confidence
76% confidence
Finding
The project structure still uses a 'gaokao' skill directory name, which conflicts with the declared Philippines geocoding purpose. On its own this is low severity, but it increases suspicion that the package was repurposed without adequate cleanup or validation.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The implementation materially contradicts the advertised skill purpose. Instead of a narrowly scoped Philippines PSGC/geocoding client, it provides a generic client to an unrelated upstream '小笨羊MCP API' and accepts caller-controlled tool selection and MCP identifiers, which is a classic sign of capability smuggling or deceptive packaging. In the context of an agent skill marketplace, this mismatch is dangerous because reviewers or users may grant trust, network access, or API secrets based on the benign geocoding description while the code can be used to reach a broader external tool platform.

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
The call_tool method exposes arbitrary upstream invocation through caller-supplied tool_name, mcp_id, and params, with those values passed directly into request headers and body. For a skill that should only perform PSGC geocoding, this overbroad dispatch creates an unnecessary remote capability surface that could be abused to invoke unrelated tools, exfiltrate data to the upstream platform, or bypass intended functional restrictions. The deceptive skill context makes this more dangerous because users would not expect they are enabling a generic tool bridge.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The file’s implementation materially conflicts with the declared skill purpose: instead of PSGC/geocoding logic, it configures and persists credentials for an unrelated external service (xiaobenyang/gaokao). In an agent-skill context, this kind of capability mismatch is a strong indicator of deceptive or hidden behavior and can be used to solicit, store, or redirect secrets outside the advertised function.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The code adds credential persistence by writing an API key to a local .env file even though that capability is unrelated to the stated geocoding function. Persisting secrets to disk increases exposure through source-control mistakes, backups, local compromise, and later unintended reuse by other processes.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill persists a supplied API key to .env without any user-facing disclosure or warning. In an agent setting, silent secret retention is risky because users may believe they are providing a transient credential while the code stores it on disk for future access.

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 via configuration. This creates a natural-language secret collection flow and durable storage path, increasing the risk of accidental disclosure, reuse by unrelated tasks, or exposure through logs, files, backups, or other skills.

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
This code manually reads .env and extracts XBY_APIKEY outside the normal settings abstraction, creating custom secret-access behavior unrelated to the declared skill purpose. In context, this increases suspicion because the skill already appears mismatched and is explicitly handling credentials for another service.

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 persist an API key to .env, which creates a local credential store controlled by application code. In an agent skill whose advertised function does not require such secret management, this increases the chance of unintended disclosure and hidden credential retention.

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 function exposes a convenience path to set and persist API keys to .env, normalizing hidden credential retention as part of ordinary skill operation. That is dangerous in this context because the skill’s stated purpose does not justify storing secrets for another service, and users may not expect local persistence.

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 allows future versions to be installed without review and can also permit resolution to a known-bad version in some environments. For an MCP server that makes network requests, supply-chain drift increases the chance of unexpected security regressions or breakage.

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 leaves dependency resolution open-ended, which reduces build reproducibility and can introduce unreviewed upstream changes. While not an immediate exploit by itself, it is a real supply-chain hygiene weakness that can expose the service to vulnerable or incompatible releases later.

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 pydantic-settings package is unpinned, so installs may pull different versions over time, undermining reproducibility and security review. In configuration-handling code, unreviewed upstream changes can affect how environment variables and settings are parsed or 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, which creates supply-chain uncertainty and may permit installation of unsafe or untested versions. Because this library handles environment file operations, version drift can directly affect sensitive configuration behavior.

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 requirement allows requests 2.31.0, and the static analysis identifies multiple advisories affecting that version. In a geocoding MCP server that likely performs outbound HTTP requests, these flaws can matter: malicious URLs or session-handling edge cases could expose credentials or weaken TLS 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
94% confidence
Finding
The requirement permits python-dotenv 1.0.1, which is flagged for a symlink-following arbitrary file overwrite issue in set_key. If the skill ever modifies .env files or processes attacker-influenced paths, this could allow overwriting unintended files on the host.

Static analysis

No suspicious patterns detected.