Back to skill

Security audit

万物识别

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to call an external image-recognition service, but it stores an API key in a local .env file and contains unrelated leftover Gaokao references that warrant review before installation.

Install only if you are comfortable giving this skill a XiaoBenYang API key, storing that key in a local plaintext .env file, and sending image URLs or full base64 image data to the external provider. Avoid using sensitive personal or confidential images unless you trust the provider and have checked its data handling terms.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding
The skill documentation indicates capabilities to read environment variables, read/write files, and access the network, yet no permissions are explicitly declared. This creates a transparency and policy gap: users and hosting platforms cannot accurately assess what the skill may access, especially since it collects and stores API keys and sends image data to an external service.

Intent-Code Divergence

Medium
Confidence
81% confidence
Finding
The workflow example references unrelated `search_schools`/`gaokao` functionality, which is inconsistent with an image-recognition skill. Such mismatches are dangerous because they indicate copy-paste errors or hidden/reused logic, increasing the risk of invoking unintended tools, mishandling user input, or masking broader capability scope than advertised.

Intent-Code Divergence

Low
Confidence
76% confidence
Finding
Documenting the project as `xiaobenyang_gaokao_skill/` for a supposedly object-recognition skill suggests the skill may be repurposed from an unrelated codebase. While not proof of active exploitation, this inconsistency weakens trust, complicates review, and can conceal unexpected behaviors or dependencies that do not match the stated purpose.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The configuration docstring identifies the code as belonging to a different skill ('小笨羊高考') than the declared image-recognition skill. This kind of identity mismatch is a supply-chain red flag because it suggests code reuse, repackaging, or hidden functionality that users did not consent to install.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
This file manages external service credentials, persistence, and global runtime state, which is materially broader than a narrowly described image-labeling skill. Capability mismatch increases the risk that the skill can contact or authenticate to unrelated backends, making hidden data flows or unauthorized service use more plausible.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
The code persistently stores an API key in a local .env file even though that behavior is not justified by the stated skill purpose. Writing secrets to local plaintext storage creates a clear credential-exposure risk through accidental inclusion in archives, backups, logs, source control, or other local disclosure paths.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill transmits user-supplied image URLs or base64-encoded image content to an external API but provides no privacy notice or data-handling disclosure. Images may contain personal, biometric, location, or confidential information, so silent transmission to a third party can create significant privacy and compliance risk.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill writes the API key to .env without any visible disclosure, warning, or consent flow. Silent persistence of credentials undermines user expectations and can lead to secrets being stored on disk in plaintext where they may later be exposed unintentionally.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The function sends a user-supplied image URL to an external API service, but this file provides no disclosure, consent flow, or indication of what remote service will receive the image reference. In an image-recognition skill, transmitting user content to a third party is expected functionality, but doing so without transparent notice can expose sensitive image data or internal URLs and creates privacy and data-handling risk.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
This function transmits raw base64-encoded image content to an external API without any visible disclosure or consent mechanism in the file. Because base64 content may contain highly sensitive user images, silent third-party transfer increases privacy, compliance, and data exfiltration concerns even if the transfer is part of the intended recognition feature.

Ssd 3

High
Confidence
95% confidence
Finding
The skill instructs the agent to solicit an API key from the user during normal conversation and persist it via `scripts.config.set_api_key(api_key)`. Collecting secrets through chat and storing them through general workflow increases the chance of accidental logging, later disclosure, insecure storage, or reuse beyond the user's intent.

Ssd 3

Medium
Confidence
92% confidence
Finding
The instruction to directly present `result["raw"]` to the user can expose sensitive fields returned by the external API, including internal metadata, tokens, debugging information, or unexpected personal data derived from the image. Raw passthrough also increases the risk of rendering untrusted content without validation or minimization.

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
90% confidence
Finding
The code explicitly and forcibly reads XBY_APIKEY from .env in custom logic, bypassing normal minimal configuration handling and expanding secret access beyond what the skill description justifies. In the context of a simple image-recognition skill, this increases suspicion because it normalizes direct credential extraction from local storage.

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
90% confidence
Finding
Opening and reading the entire .env file gives the skill direct access to locally stored secrets and configuration data. Even though the current logic looks for a specific key, this pattern broadens secret exposure and is unnecessary for a narrowly scoped image-labeling tool.

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
96% confidence
Finding
This function is explicitly designed to save an API key into a local .env file, creating durable plaintext credential storage. In the context of an image-recognition skill with no stated need for local secret persistence, this is an unjustified and dangerous expansion of capability.

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
94% confidence
Finding
The setter persists the API key as part of normal operation, making durable credential storage a built-in feature of the skill. This increases exposure if the host is compromised, if dotfiles are backed up or committed, or if multiple users share the environment.

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
93% confidence
Finding
The dependency is specified with a lower-bound constraint only, which allows future installs to resolve to different versions over time. This weakens reproducibility and can unexpectedly introduce vulnerable or breaking releases into the skill's environment.

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
93% confidence
Finding
Using an unpinned version for pydantic means builds are not deterministic and may pull in newer releases with security regressions or incompatible behavior. While not an immediate exploit by itself, it increases supply-chain and operational risk.

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
93% confidence
Finding
An unpinned pydantic-settings dependency permits uncontrolled version drift across installations. That can lead to unexpected code paths or inherited vulnerabilities from newly resolved releases.

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
93% confidence
Finding
Leaving python-dotenv unpinned allows package resolution to vary over time, making the environment less reproducible and potentially exposing the skill to newly introduced vulnerable releases. This is a supply-chain hygiene issue rather than a direct exploit path.

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
97% confidence
Finding
The requirements permit installation of requests 2.31.0, a version with multiple published advisories. In a skill that likely processes external inputs and may fetch remote resources, known flaws in request handling and credential leakage increase the chance of SSRF-adjacent abuse, trust boundary violations, or secret exposure.

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 allowed python-dotenv version includes a published issue involving symlink following in set_key, which can enable arbitrary file overwrite in affected usage patterns. This skill's dependency list alone does not prove the vulnerable function is invoked, but keeping a known-vulnerable version available is still unsafe.

Static analysis

No suspicious patterns detected.