Back to skill

Security audit

野生动物检测

Security checks for vulnerabilities and agentic risk

Overview

This wildlife-detection skill is mostly an API wrapper, but it persistently stores an API key, uploads user images to a third-party service, and contains unrelated Gaokao/school-search leftovers that make its scope unclear.

Install only if you are comfortable giving this skill a XiaoBenYang API key and sending image URLs or full image contents to that service. Avoid using sensitive, private, biometric, or location-revealing images unless the provider's data handling is acceptable to you, and treat the saved .env API key as a local secret that may persist after 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 (20)

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill documentation indicates capabilities to read environment variables, read/write files, and access the network, yet no permissions are declared. This creates a transparency and policy-enforcement gap: the skill can request, persist, and transmit sensitive data such as API keys or images without an explicit permission model visible to users or reviewers.

Intent-Code Divergence

Medium
Confidence
86% confidence
Finding
The workflow example references an unrelated function (`search_schools`) instead of the wildlife-detection tool, showing the skill documentation is inconsistent with its stated purpose. Such mismatches are dangerous because they can hide copied logic, cause the agent to invoke unintended tools, or mask data flows to unrelated services.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The file’s behavior is materially inconsistent with the declared wildlife-detection purpose: it configures a remote XBY/Gaokao service and manages an API key rather than image-model settings. This kind of scope mismatch is dangerous because it can conceal hidden data flows, credential handling, or service dependencies that users would not reasonably expect from a local image-analysis skill.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
This code reads and persists API credentials to .env even though the skill is presented as image-based wildlife detection, creating an unexpected credential collection and storage path. In context, that mismatch increases risk because operators may supply secrets they did not intend to expose to this skill, and plaintext local persistence broadens the chance of accidental disclosure.

Intent-Code Divergence

Medium
Confidence
91% confidence
Finding
The docstring states this is a Gaokao skill configuration, directly contradicting the wildlife-detection manifest. Such inconsistencies are a strong signal of copied or repurposed code and make security review harder, potentially hiding unrelated network access, credential logic, or other unsafe behavior under a misleading label.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill instructs the agent to ask the user for an API key and persist it via `scripts.config.set_api_key(api_key)` without explaining storage scope, retention, or security protections. This can lead users to disclose credentials without informed consent, and persistent storage increases the risk of leakage through logs, files, or later misuse.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill sends user-provided image URLs or base64 image content to an external API but does not disclose this transfer or obtain explicit user consent. Images can contain sensitive personal, biometric, or location information, so undisclosed third-party transmission creates a privacy and compliance risk.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The function silently writes the provided API key into a local .env file and process environment without any explicit consent, warning, or visibility to the user. Storing secrets this way can leave them exposed in source trees, backups, logs, or multi-user environments, especially when users do not realize persistence is happening.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The function sends a user-supplied image URL to an external API endpoint via call_api, but this file provides no user-facing disclosure, consent flow, or warning that image-derived data will leave the local environment. Because images and their source URLs can contain sensitive personal or location information, undisclosed third-party transmission creates a real privacy and compliance risk.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
This function transmits raw base64-encoded image content to an external API without any visible warning or consent mechanism in the file. Sending full image contents off-platform is especially sensitive because the payload may contain biometric, personal, or confidential visual data, making undisclosed exfiltration materially risky.

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 explicitly opens and parses the .env file to extract XBY_APIKEY, bypassing normal settings abstraction and forcibly loading a secret for an unrelated remote service. In a wildlife-detection skill context, that secret access is unexpected and expands the attack surface by normalizing direct credential scraping from local configuration files.

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
86% confidence
Finding
The existence check and subsequent direct read of .env participate in explicit credential access behavior for XBY_APIKEY. While not necessarily malicious, it is unsafe in context because the skill’s declared purpose gives no reason to inspect local secret files, undermining user trust and increasing the chance of unintended secret exposure.

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 dedicated to saving an API key into .env, creating persistent plaintext storage of a secret inside the project workspace. In the context of a purported wildlife-detection skill, that behavior is unjustified and increases exposure through accidental commits, backups, local compromise, or downstream tooling that reads repository files.

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
88% confidence
Finding
The helper explicitly promises to set and persist an API key, normalizing secret capture and long-term storage for a skill whose advertised function does not require it. This is dangerous because it encourages operators to provide and retain credentials in a component they would expect to only process images locally.

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 version only, which allows future installs to resolve to different versions over time. This weakens build reproducibility and can unintentionally introduce vulnerable or incompatible releases through the supply chain.

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
Using an unpinned version range for pydantic means the installed package may change between environments or over time. That creates supply-chain risk and can pull in breaking or vulnerable versions without an explicit 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
97% confidence
Finding
The package version is not fixed, so dependency resolution may install newer releases than expected. This increases the chance of accidental exposure to newly introduced vulnerabilities or malicious package compromise.

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
A minimum-only version constraint for python-dotenv permits non-deterministic installs and reduces control over supply-chain changes. In practice, this can lead to inconsistent environments and accidental adoption of vulnerable versions.

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
99% confidence
Finding
The requirement allows requests 2.31.0, and the static analysis indicates that exact version has multiple published advisories. If dependency resolution selects that version, network interactions performed by the skill could be exposed to credential leakage or request verification flaws, which is relevant because this skill likely processes external inputs and may call remote services.

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
86% confidence
Finding
The requirement permits installation of python-dotenv 1.0.1, which is reported as affected by a symlink-following arbitrary file overwrite issue in set_key. This is less likely to be directly exploitable in a wildlife detection skill unless the code modifies .env files in a writable attacker-influenced path, but it still represents avoidable risk.

Static analysis

No suspicious patterns detected.