Back to skill

Security audit

图标数据服务

Security checks for vulnerabilities and agentic risk

Overview

The skill offers icon lookup functions, but it needs Review because it collects and persists a third-party API key, routes requests through Xiaobenyang rather than directly to Iconify, and contains unrelated Gaokao/school-service remnants that make its true scope unclear.

Install only if you are comfortable giving this skill a Xiaobenyang API key, having that key stored in a local .env file, and sending icon queries through Xiaobenyang's MCP API. Review the copied Gaokao references and the generic upstream dispatch code before trusting it in sensitive workspaces.

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
93% confidence
Finding
The skill documentation instructs the agent to read environment state, prompt for an API key, persist it locally, and call remote services, but it declares no permissions for env, file read/write, or network use. This creates a transparency and consent problem: users and policy layers cannot accurately assess what the skill can access or modify, especially because it handles secrets and performs outbound requests.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The skill claims to provide Iconify access, but the documented behavior includes collecting a third-party API key, storing it in .env, and routing requests through xiaobenyang.com rather than directly to Iconify. This mismatch is dangerous because users may disclose credentials or trust data handling under false assumptions about the backend, data path, and persistence of secrets.

Intent-Code Divergence

Medium
Confidence
85% confidence
Finding
The workflow example references an unrelated school-search function in a skill that is supposed to handle icon data. Such cross-skill inconsistencies are a supply-chain and integrity risk because they suggest copy-paste errors, possible code/documentation mix-ups, or invocation of unintended tools with different data access patterns.

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
This client is a generic authenticated proxy to an upstream MCP API, accepting arbitrary mcp_id, tool_name, and params instead of restricting behavior to Iconify-related operations. In the context of a skill advertised as an icon data service, that broader capability expands the attack surface and can enable unintended upstream actions, data access, or misuse if other code exposes these inputs to users or agents.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The method allows arbitrary upstream tool invocation by placing caller-controlled tool_name in headers and forwarding arbitrary params to the remote API. Because the stated purpose is limited to icon browsing/search/example retrieval, this overbroad dispatch mechanism can be abused to invoke non-icon tools or hidden functionality exposed by the same upstream service.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The file is functionally unrelated to the declared Iconify-style icon data service and instead manages an XBY/gaokao API endpoint and API key lifecycle. This mismatch is dangerous because it indicates the skill may perform undeclared data access and secret-handling behavior, increasing the risk of hidden credential collection or supply-chain abuse in a context where such access is unnecessary.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The module can persist API keys into a local .env file, which exceeds what is normally required for a read-only icon browsing/search skill. Persisting secrets locally creates a confidentiality risk through accidental commit, local disclosure, or reuse by other processes, especially when the feature is not clearly justified by the skill's stated purpose.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The class docstring identifies the code as a configuration module for a different '小笨羊高考' skill, directly contradicting the declared icon data service. Such provenance mismatch is a strong indicator of copied or repurposed code that may bring unintended secret handling, external connectivity, or business logic into an unrelated skill.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The function writes an API key to .env without any user-facing warning, consent flow, or indication that the secret will be persisted on disk. Silent persistence increases the chance of users unknowingly leaving credentials behind in insecure locations, backups, or version control.

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
93% confidence
Finding
The code forcibly reads a specific API key from the local .env file during initialization, even though the declared icon service does not obviously require such a credential. In this context, proactive secret loading from local storage is dangerous because it expands the skill's access to credentials unrelated to its stated function and can facilitate undeclared outbound use of those secrets.

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
93% confidence
Finding
Checking for and reading the .env file as part of custom initialization is an explicit credential access path. Because the skill's published purpose is icon data access, this local secret-reading behavior is out of scope and therefore more suspicious and more dangerous than it would be in a service that clearly requires authenticated backend access.

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
This function is explicitly designed to save an API key into .env, creating a durable local credential store within a skill whose stated purpose does not justify such capability. Writing secrets to plaintext project files materially increases the chance of credential leakage through filesystem access, backups, logs, or accidental repository commits.

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
92% confidence
Finding
The public helper advertises setting and persisting an API key to .env as a first-class feature. In the context of a purported icon data service, exposing a convenience path for secret capture and storage broadens the attack surface and normalizes collecting credentials that users would not expect this skill to need.

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 uses a lower-bound version specifier instead of an exact pin, which makes builds non-reproducible and can introduce unexpected or vulnerable package versions over time. In a server-side skill that depends on external libraries for network access, this increases supply-chain and stability risk even if it is not immediately exploitable 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
95% confidence
Finding
Using an unpinned version for pydantic allows future installs to resolve to different releases, which can introduce breaking changes or newly disclosed vulnerabilities without code review. This is primarily a supply-chain hygiene issue rather than a direct exploit path, but it weakens deployment integrity.

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
An unpinned pydantic-settings dependency permits uncontrolled version drift across environments, increasing the chance of pulling in insecure or incompatible releases. This is a genuine dependency-management weakness, though the standalone impact is low.

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
python-dotenv is specified with only a minimum version, so installations may receive different versions over time, including versions with security regressions or behavioral changes. For a service skill that may load environment configuration, reproducibility matters for both security and operations.

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
90% confidence
Finding
The requirements allow installation of requests 2.31.0, a version with published advisories including credential leakage via malicious URLs and session verification issues. Because this skill is an MCP server that accesses external icon resources, use of an HTTP client in a network-facing context makes dependency vulnerabilities more relevant than in 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
83% confidence
Finding
The requirements allow python-dotenv 1.0.1, which is flagged with an advisory involving symlink following in set_key that could enable arbitrary file overwrite in affected usage patterns. The danger depends on whether the skill actually invokes set_key on attacker-influenced paths; from this file alone that usage is unconfirmed, so the issue is real but context-dependent and likely lower risk here.

Static analysis

No suspicious patterns detected.