Back to skill

Security audit

餐饮菜品动效广告|AI-HIVE

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed AI-HIVE restaurant video-ad helper, but users should be careful with API keys, paid generation, and uploaded media.

Install only if you are comfortable using an AI-HIVE API key, possibly incurring generation charges after confirmation, and uploading selected media to AI-HIVE/object storage. Prefer a virtual environment, pin dependencies, keep the API key out of logs and repositories, and verify prompts, routing, and files before running generation.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Note
Location
scripts/videogen.py:8
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: scripts/videogen.py:8-12
Related Documentation: SKILL.md:67
Vulnerability Type: Unconstrained third-party package installation
Risk Level: Low

Evidence

python
try:
    import requests
except ImportError:
    print("缺少依赖:requests。请运行 pip3 install requests", file=sys.stderr)
    sys.exit(1)

The documentation also declares that the script requires requests, but the project contains no pinned requirements file, lockfile, package hash, or package-index restriction.

Technical Analysis

When requests is unavailable, the script instructs the user to install it using an unconstrained pip3 install requests command. This resolves the package and its transitive dependencies from the user's configured Python package index at installation time.

Although requests is a well-established package and no malicious dependency is included directly in this repository, the installation is not reproducible. The effective dependency versions may change after the Skill has been audited. Security therefore depends on the current state of the package index, resolver configuration, and every transitive dependency selected at installation time.

This is a supply-chain hardening issue rather than evidence that the project intentionally retrieves a malicious package.

Attack Path

  1. A user invokes scripts/videogen.py in an environment where requests is not installed.
  2. The script recommends running pip3 install requests.
  3. The user executes that command without version or hash constraints.
  4. pip resolves mutable package and transitive-dependency versions from the configured index or mirror.
  5. If that source, a selected release, or a transitive dependency has been compromised, package installation code can execute with the privileges of the user running pip.
  6. The compromised dependency can subsequently execute whenever videogen.py import ...[truncated 618 chars]
Remediation
View remediation

Remediation Suggestions

  1. Add a reviewed requirements file with exact dependency and transitive-dependency versions.
  2. Generate and verify cryptographic hashes for every package, then install with:
    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  3. Use a lockfile generated by a dependency-management tool such as pip-tools, Poetry, or uv.
  4. Configure installations to use an approved package index or internal mirror.
  5. Run dependency vulnerability scanning in continuous integration and update pinned versions through a controlled review process.
  6. Replace the unconstrained installation instruction with a reference to the locked dependency installation procedure.
  7. Prefer installation inside an isolated virtual environment rather than the system Python environment.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description promises a substantially broader operational capability: producing restaurant dish motion ad materials and interfacing with AI-HIVE services to generate and manage media tasks. The supplied code does not access external services, process images, create scripts beyond listing artifact placeholders, or generate videos. Its actual primary purpose is limited to creating a draft JSON brief. That is a material description-behavior mismatch, not merely an implementation subset or supporting detail.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a domain-specific restaurant advertising and food-video production skill with AI-assisted media generation workflows and business-specific inputs. The supplied code instead provides only generic local video utilities built around ffmpeg/ffprobe: probe, trim, aspect conversion, mute, loudness normalization, and concat. These are ordinary editing operations and could be supporting pieces in a larger pipeline, but on their own they do not substantiate the claimed primary purpose or specialized capabilities. There is no evidence of API access, asset generation, script generation, store-versioning, or food-ad-specific logic. Therefore the description materially overstates and misrepresents what this code chunk actually does.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises and demonstrates code paths that use environment variables, shell commands, file operations, and network access, but it does not declare any explicit tool scope or permissions boundary. In an agent environment, missing scope declarations can lead to overbroad capability exposure, making it easier for the skill to read local files, access secrets, or invoke external services beyond what reviewers and operators expect.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description and title are entirely scoped to Chinese-language requests and usage context, and the invocation examples in the document are all Chinese phrases. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The default prompt explicitly requires a "production-ready Chinese workflow," which imposes a language choice in the skill behavior. This is a natural-language policy concern because the file does not offer the user an option to choose another language or indicate that Chinese is optional.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/edit_video.py (reported line 20)May include surrounding context.

python
def run(args: list[str]) -> None:
    print(" ".join(args))
    subprocess.run(args, check=True)


def main() -> None:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file is presented as a food-dish motion ad skill, but the implementation exposes a broad generic AI-Hive client for chat, image, video, upload, model listing, and account access. This scope mismatch weakens least-privilege boundaries: an agent invoking the skill for a narrow purpose can be induced to perform unrelated API actions, increasing the attack surface and enabling policy bypass through unintended capabilities.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module and CLI describe themselves as a general AI capability wrapper, which contradicts the advertised fixed-purpose skill. In practice, this can mislead downstream agents or reviewers about what the tool is allowed to do, making it easier to smuggle broad-generation behavior under a narrowly approved skill label.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and user-facing guidance are written entirely in Chinese, and the script's prompts and status messages continue this throughout the file. This imposes a specific language on users without any opt-in, fallback, or documented region-specific justification, which matches the language/locale policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

Exposing user-info and model inventory queries gives the skill capabilities unrelated to creating restaurant dish motion ads. While not directly code-execution, these endpoints can leak account metadata, balances, and available model inventory that help an attacker enumerate the environment or select alternative models outside the intended workflow.

Content

No source excerpt is available for this finding.