Back to skill

Security audit

Happy Horse 视频工具箱|AI-HIVE

Security checks for vulnerabilities and agentic risk

Overview

This is mostly a coherent AI-HIVE video helper, but it needs review because it handles API keys and downloads files with under-scoped network and filename safeguards.

Review before installing. Use this only with the default AI-HIVE endpoint or a trusted endpoint, keep API keys scoped and revocable, avoid setting AI_HIVE_BASE_URL from untrusted instructions, confirm any billable generation before running commands, and choose an output directory where accidental overwrites would not damage important files.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/videogen.py:75
Finding

API Key Disclosure Through an Unrestricted Custom Base URL

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/videogen.py:399
Finding

Arbitrary File Write Through Server-Controlled Download Filenames

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a comprehensive Happy Horse video toolbox with decision logic and external API-driven media workflow capabilities. The actual code chunk is a simple command-line utility that creates a JSON brief from user-supplied fields. It does not access external services, process media, generate prompts dynamically, choose modes, or perform any of the described API operations. While blueprint creation is loosely related to pre-production planning, the primary behavior is materially narrower and different from the declared end-to-end video tool functionality, so this is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description centers on an AI-powered Happy Horse video production toolbox with model/mode recommendation and external API-driven generation workflows. The supplied code does none of that. It is a small local utility wrapping ffmpeg/ffprobe to perform basic deterministic edits and inspection. While video editing is loosely mentioned in the description, the primary purpose and capabilities are materially different: the declaration emphasizes AI generation, reference handling, pricing/routing, and asynchronous API orchestration, whereas the code only performs straightforward local media transformations. This is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises and demonstrates capabilities that involve environment variables, local file access, network calls, and shell execution, but it does not declare any explicit tool scope or allowed-tools boundary. That weakens least-privilege controls and can let a broadly triggered skill access sensitive resources or perform side effects beyond what users expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases include very broad terms such as general AI video and video editing requests, which can cause the skill to activate in many unrelated contexts. In combination with undeclared network, file, env, or shell-capable behavior, overbroad activation increases the chance of unintended execution, exposure of local resources, or user confusion about what tool is acting.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The default prompt hard-codes Chinese output ('production-ready Chinese workflow') without explicit user opt-in. This can override user preference, reduce transparency for users expecting another language, and make generated workflows or commands harder for some users or reviewers to validate, which slightly increases the risk of misunderstandings in security- or compliance-sensitive operations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill enables implicit invocation without any visible trigger constraints, exclusions, or narrowing conditions. Because this skill can generate production-ready workflows and runnable AI-HIVE commands for video creation/editing, broad auto-invocation increases the chance it is invoked in contexts the user did not clearly intend, which can cause unauthorized tool use, unintended content generation, or policy-bypassing assistance.

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
91% confidence
Finding

The top-level docstring describes a '通用 AI 能力调用工具' that supports text chat, image generation, video generation, model queries, media upload, and task polling. The skill manifest, however, frames this skill specifically as a Happy Horse video toolkit for selecting T2V/I2V/R2V video workflows, so the file's documented purpose is materially broader than the declared skill scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The module docstring presents the tool entirely in Chinese as a general-purpose skill description, and the rest of the user-facing prompts/help text are likewise Chinese-only. For a general-purpose skill, this constitutes a locale/language constraint without any explicit user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code implements a full text chat API client and exposes it through command handling elsewhere in the file, even though the manifested skill is specifically about generating, referencing, and editing Happy Horse videos. General chat is not an obvious requirement for selecting video modes, uploading reference assets, polling jobs, or downloading video outputs.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This file contains an image generation endpoint wrapper and associated command path, which expands the skill into standalone image generation rather than Happy Horse video creation/editing. The manifest emphasizes T2V/I2V/R2V video workflows and related delivery checks, not generic image generation as a primary capability.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code embeds user-facing natural-language strings primarily in Chinese, including the tool name, defaults, and content fields, without any indication that users can opt into another language. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The skill-specific parser describes the program as a video skill, but the file itself also contains broader generic AI operations and a separate parser exposing text chat, image generation, model listing, and user-info actions. This creates an intent/documentation split inside the file: the comments and descriptions suggest a narrower video-focused tool than the codebase actually implements.

Content

No source excerpt is available for this finding.