Back to skill

Security audit

动物识别

Security checks for vulnerabilities and agentic risk

Overview

This animal-recognition skill appears functional, but it needs review because it stores an API key in plaintext and sends image data to an external service with inconsistent disclosure.

Review before installing. Use this only with non-sensitive images you are willing to send to xiaobenyang.com, and use a scoped, revocable API key. Expect the key to be saved in a local .env file as XBY_APIKEY; remove or rotate it if you stop using the skill. The package does not show destructive behavior or exfiltration beyond its remote API workflow, but its disclosure and scoping are too inconsistent for automatic approval.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill declares no permissions while its documented behavior clearly involves environment access, file read/write, and network communication. This creates a transparency and consent gap: users and hosting platforms may not realize the skill can persist credentials locally and send data to a third-party service.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The skill's declared purpose says no extra input is needed, but the workflow actually requires an image URL or base64 input, collects an API key, persists it, and sends data to an external API. This mismatch is dangerous because it can mislead users about what data they must provide and obscure credential handling and third-party data transfer.

Description-Behavior Mismatch

High
Confidence
96% confidence
Finding
The file implements a generic remote tool dispatcher that accepts arbitrary tool names and parameter dictionaries, which materially exceeds the declared skill scope of simple animal image labeling with no extra input. In an agent setting, this creates a capability mismatch that can be abused to invoke unintended upstream tools, exfiltrate data, or perform actions the user did not authorize.

Context-Inappropriate Capability

High
Confidence
95% confidence
Finding
The request logic directly maps caller-controlled tool_name, mcp_id, and params into outbound API headers/body, enabling broad external tool dispatch unrelated to the stated purpose. In the context of a narrowly described vision skill, this unnecessary generality increases the attack surface and could let other components misuse the skill as a proxy to access hidden upstream capabilities.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The file implements configuration and API-key persistence for a Gaokao-related remote service, which materially contradicts the declared purpose of a simple animal-recognition skill. This kind of capability mismatch is dangerous because it can hide undeclared data flows, remote service dependencies, and secret handling that users would not expect from the manifest.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
Persisting an API key to .env is not justified by the stated behavior of 'no extra input' animal-label recognition, and it creates an unnecessary secret-retention surface on disk. Even without active exfiltration, storing credentials locally increases the chance of accidental exposure through source control, backups, logs, or multi-user environments.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The class docstring identifies the component as a '小笨羊高考Skill' configuration, directly conflicting with the manifest's animal-recognition description. This inconsistency is a strong indicator of code reuse or repurposing that can conceal undeclared capabilities and makes the overall package less trustworthy.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill instructs the agent to ask users for an API key and save it, but provides no warning about the sensitivity of that credential, storage location, retention, or misuse risk. In practice, this can lead users to disclose secrets without informed consent and may expose credentials if the environment or .env file is later accessed.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The instruction to directly display raw API response data can expose unexpected sensitive fields, internal metadata, or untrusted content returned by the external service. Because the response comes from a third party, blindly rendering it increases the risk of data leakage and unsafe content propagation to the user.

Missing User Warnings

Medium
Confidence
79% confidence
Finding
This code sends an API key and arbitrary parameters to an external service without any indication in this file of consent, minimization, or disclosure controls. In a skill advertised as requiring no extra input, hidden transmission of data to a remote API can expose user content or internal agent data to third parties without clear authorization.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The code writes the provided API key to a plaintext .env file with no user-facing disclosure, consent prompt, or warning about persistence. Secret storage without transparency is dangerous because users may assume the key is used transiently while it is actually being retained on disk for later reuse or compromise.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
The function transmits user-supplied image content by URL to an external API, but the user-facing text does not disclose that the image or image reference is being sent off-platform. This creates a privacy and data-handling risk, especially if users submit sensitive images or internal URLs without informed consent.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
This function sends raw Base64-encoded image content to an external API without warning users that the full image leaves the local environment. That is a real privacy issue because images can contain sensitive personal, biometric, or proprietary information, and users are not informed of the transfer.

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
79% confidence
Finding
The code explicitly and forcibly reads .env to extract XBY_APIKEY outside the normal settings abstraction, increasing direct secret access and bypassing clearer configuration boundaries. In the context of an animal-recognition skill, this secret-reading behavior is less expected and therefore more suspicious and risky.

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
79% confidence
Finding
This line continues the explicit file-based secret access path by opening and reading the .env file contents directly. Direct credential reads increase exposure of sensitive material in application logic and are particularly concerning when the skill's declared purpose does not justify secret management.

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
87% confidence
Finding
This function is dedicated to saving an API key into a local .env file, creating a plaintext credential store. Plaintext persistence materially increases the risk of credential disclosure through repository commits, backups, shared filesystems, or local compromise.

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
86% confidence
Finding
The API-key setter explicitly persists credentials as part of normal operation, normalizing long-term retention of secrets for a skill that claims not to need extra input. That mismatch makes the behavior more dangerous because users are less likely to expect or audit credential storage in this context.

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
The dependency is specified with a lower bound only (`requests>=2.31.0`), which allows future installs to pull different versions over time and weakens build reproducibility and supply-chain control. In this file, the risk is elevated slightly because the same package is also flagged with known advisories, so leaving it unpinned makes it easier to unintentionally resolve to an unsafe version range.

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
92% confidence
Finding
`pydantic>=2.7.0` is unpinned, so builds are not reproducible and may silently consume newer package releases with unexpected security or behavioral changes. This is a common supply-chain hygiene weakness rather than an immediately exploitable flaw 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
92% confidence
Finding
`pydantic-settings>=2.2.0` permits arbitrary newer versions at install time, reducing reproducibility and making dependency drift possible. While not an exploit on its own, this increases supply-chain exposure and complicates security 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
95% confidence
Finding
`python-dotenv>=1.0.1` is unpinned, which creates the usual dependency drift and supply-chain risk. In this case it is more concerning because the static analysis also associates version 1.0.1 with a known advisory, so the current lower bound does not clearly exclude vulnerable resolutions.

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
96% confidence
Finding
The file allows installation of `requests` 2.31.0, which is identified as having multiple published advisories, including credential leakage and request verification issues. Because this skill likely performs network operations for image-related processing or downloads, use of a vulnerable HTTP client can expose secrets, weaken transport security, or enable other request-handling abuses 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
85% confidence
Finding
The dependency specification permits `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 impact in this skill appears limited because a simple animal-recognition skill may not call `set_key`, but the vulnerable package version is still present in the allowed dependency set.

Static analysis

No suspicious patterns detected.