Back to skill

Security audit

Ai Video Pro

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent video-prompt and video-generation purpose, but it also bundles high-impact publishing, cloud upload, dependency installation, and local state features with incomplete scoping and guardrails.

Use prompt-only mode for sensitive ideas. Before enabling generation or publishing, review the destination provider, use scoped throwaway API tokens where possible, and avoid running install_deps.py outside an isolated environment. Treat the social and cloud upload features as account actions that can publish or expose videos externally.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Error
Location
scripts/install_deps.py:78
Finding
Unpinned Remote Dependencies Permit Supply-Chain Code Execution<![CDATA[ ## Vulnerability Details **File Location**: `scripts/install_deps.py:78-130` **Vulnerability Type**: Unpinned packages and mutable remote repository installation **Risk Level**: High ### Vulnerable Code ```python def install_python_packages(packages: list) -> dict: """Install Python packages.""" result = {"tool": "python_packages", "success": False, "packages": {}} for pkg in packages: try: subprocess.run( [sys.executable, "-m", "pip", "install", pkg], check=True, capture_output=True, timeout=120, ) result["packages"][pkg] = "installed" except subprocess.CalledProcessError as e: result["packages"][pkg] = f"installation failed: {e.stderr.decode()[:200]}" except Exception as e: result["packages"][pkg] = f"error: {e}" ``` ```python try: # Clone ComfyUI subprocess.run( ["git", "clone", "https://github.com/comfyanonymous/ComfyUI.git", str(target_path)], check=True, timeout=300, ) # Install dependencies requirements = target_path / "requirements.txt" if requirements.exists(): subprocess.run( [sys.executable, "-m", "pip", "install", "-r", str(requirements)], check=True, timeout=600, ) ``` ### Technical Analysis The installer obtains Python packages by name without version constraints or package hashes. It also clones the current default branch of ComfyUI without selecting or verifying a reviewed commit or signed release. It subsequently installs dependencies from the remotely retrieved `requirements.txt`. Consequently, the effective code installed by the Skill can change after the Skill itself has been reviewed. A compromised package release, package index, GitHub repository, maintainer account, or mutable dependency declaration could introduce arbitrary installation-time or runtime code. The module documentation states that user confirm ...[truncated 1552 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to an exact reviewed version. 2. Maintain a lock file with hashes and install with hash verification, for example: ```bash python -m pip install --require-hashes -r requirements.lock ``` 3. Pin ComfyUI to a reviewed immutable commit or signed release: ```bash git clone --no-checkout https://github.com/comfyanonymous/ComfyUI.git git checkout <reviewed-commit-hash> ``` 4. Verify the checked-out commit and, where available, validate signed tags or release artifacts. 5. Review and lock ComfyUI's transitive dependencies rather than directly installing a mutable remote `requirements.txt`. 6. Install Python packages inside an isolated virtual environment with no administrative privileges. 7. Add an actual interactive confirmation prompt that displays the exact source, version, destination, and commands before making changes. 8. Require a separate explicit flag such as `--yes` for non-interactive operation. 9. Avoid invoking package managers through `sudo` automatically. Instead, print the command and require the user to perform privileged installation separately. 10. Record dependency provenance and verify downloaded artifacts against expected checksums. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/preview_server.py:151
Finding
Unescaped File Metadata Enables HTML Injection in the Local Preview Server<![CDATA[ ## Vulnerability Details **File Location**: `scripts/preview_server.py:151-158,252-258` **Vulnerability Type**: HTML and attribute injection through an attacker-controlled filename or file path **Risk Level**: Medium ### Vulnerable Code ```html <video id="player" controls preload="auto"> <source src="/video/{filename}" type="{mimetype}"> Your browser does not support HTML5 video playback. </video> ``` ```html <div class="info"> <table> <tr><td>File name</td><td>{filename}</td></tr> <tr><td>File size</td><td>{filesize}</td></tr> <tr><td>Path</td><td>{filepath}</td></tr> </table> </div> ``` ```python html = HTML_TEMPLATE.format( filename=self.__class__.video_filename, mimetype=mime_type, filesize=size_str, filepath=str(video_path), ) ``` ### Technical Analysis The preview server inserts the selected video's filename and resolved filesystem path directly into an HTML template. The filename is used both in an HTML attribute and in an HTML text context, while the path is inserted into an HTML text context. None of these values are HTML-escaped or safely URL-encoded. A filename can contain HTML-significant characters on supported filesystems. If a user previews a file with a crafted name, the generated page can break out of its intended markup context and introduce arbitrary HTML or JavaScript. Binding the server to `127.0.0.1` limits remote access but does not prevent exploitation because the malicious content is rendered in the user's browser. The localhost origin can retrieve `/video/...`, so injected browser code may access the video being served and transmit its contents or metadata to another network destination if browser policy permits the outbound request. ### Attack Path 1. An attacker supplies or causes the user to download a video with a filename containing crafted HTML markup. 2. The user starts the preview server for that file: ```bash python scripts/preview_server.py --fil ...[truncated 921 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Escape every dynamic value according to its output context: ```python import html safe_filename = html.escape(self.__class__.video_filename, quote=True) safe_filepath = html.escape(str(video_path), quote=True) safe_mimetype = html.escape(mime_type, quote=True) ``` 2. Do not place the raw filename in the video URL. Use a fixed route such as `/video` because the server already stores the selected file internally: ```html <source src="/video" type="{mimetype}"> ``` 3. If dynamic URL paths remain necessary, encode them with `urllib.parse.quote()` before insertion. 4. Add a restrictive Content Security Policy, for example: ```http Content-Security-Policy: default-src 'self'; media-src 'self'; script-src 'self'; connect-src 'none'; object-src 'none'; base-uri 'none' ``` 5. Move inline JavaScript into a static local resource so `script-src 'self'` can be enforced without allowing unsafe inline scripts. 6. Add security headers such as: ```http X-Content-Type-Options: nosniff Referrer-Policy: no-referrer ``` 7. Add regression tests using filenames containing quotes, angle brackets, ampersands, and representative injection payloads. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (90)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
Provider-manager testing, environment-variable inspection, and backend capability validation are administrative behaviors not aligned with a simple prompt tool. While less severe than installation or publishing, they still increase access to sensitive configuration and can normalize unnecessary credential handling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
Provider-manager testing, environment-variable inspection, and backend capability validation are administrative behaviors not aligned with a simple prompt tool. While less severe than installation or publishing, they still increase access to sensitive configuration and can normalize unnecessary credential handling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
Provider-manager testing, environment-variable inspection, and backend capability validation are administrative behaviors not aligned with a simple prompt tool. While less severe than installation or publishing, they still increase access to sensitive configuration and can normalize unnecessary credential handling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Provider-manager testing, environment-variable inspection, and backend capability validation are administrative behaviors not aligned with a simple prompt tool. While less severe than installation or publishing, they still increase access to sensitive configuration and can normalize unnecessary credential handling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
Provider-manager testing, environment-variable inspection, and backend capability validation are administrative behaviors not aligned with a simple prompt tool. While less severe than installation or publishing, they still increase access to sensitive configuration and can normalize unnecessary credential handling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
Provider-manager testing, environment-variable inspection, and backend capability validation are administrative behaviors not aligned with a simple prompt tool. While less severe than installation or publishing, they still increase access to sensitive configuration and can normalize unnecessary credential handling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
Provider-manager testing, environment-variable inspection, and backend capability validation are administrative behaviors not aligned with a simple prompt tool. While less severe than installation or publishing, they still increase access to sensitive configuration and can normalize unnecessary credential handling.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
Provider-manager testing, environment-variable inspection, and backend capability validation are administrative behaviors not aligned with a simple prompt tool. While less severe than installation or publishing, they still increase access to sensitive configuration and can normalize unnecessary credential handling.

Credential Access

High
Category
Privilege Escalation
Content
**API:** 微博开放平台 `https://api.weibo.com/2/`
- 上传: `statuses/upload_video`
- 认证: OAuth 2.0 Access Token
- 环境变量: `WEIBO_ACCESS_TOKEN`

**FFmpeg 转码命令:**
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
**API:** 抖音开放平台 `https://open.douyin.com/`
- 上传: `/api/douyin/v1/video/upload/`
- 发布: `/api/douyin/v1/video/create/`
- 认证: OAuth 2.0 Access Token
- 环境变量: `DOUYIN_ACCESS_TOKEN`

**FFmpeg 转码命令 (9:16 竖屏):**
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
This script adds broad publishing, cloud upload, and persistent local state capabilities that significantly exceed the skill's stated purpose of prompt decoding/optimization. Such scope expansion is dangerous because it introduces credential use, outbound data transfer, and filesystem persistence that a user may not reasonably expect from the advertised skill, increasing the chance of covert data movement or unauthorized actions.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The code retrieves platform and cloud credentials and performs outbound uploads to social platforms and object storage, which is highly sensitive behavior outside the core prompt-generation use case. In this skill context, that mismatch makes the capability more dangerous because it enables exfiltration of user media and use of external accounts under an innocuous-seeming feature set.

Description-Behavior Mismatch

Medium
Confidence
91% confidence
Finding
The README expands the advertised capability from prompt optimization and optional video generation into one-click publishing to external social platforms. That materially changes the trust boundary by introducing outbound data transfer and account-integrated actions not reflected in the stated scope, which can mislead users about what the skill may do.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
One-click publishing to social platforms implies transmission of generated media and possibly metadata or account-linked content to third parties, yet the README provides no warning about privacy, persistence, or external sharing. This can cause users to disclose sensitive or proprietary content without informed consent.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
The README instructs users to configure multiple API keys and run environment detection without explaining how credentials are discovered, accessed, stored, or protected. In a skill that auto-detects tools and keys, lack of disclosure increases the risk of overbroad credential access or accidental exposure.

Context-Inappropriate Capability

Medium
Confidence
88% confidence
Finding
Advertising automatic dependency installation introduces environment-modifying behavior beyond the core prompt optimization purpose. Users may run installation helpers that fetch and execute code or alter the host environment without clear disclosure, increasing supply-chain and system integrity risk.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill advertises invocable behavior and references scripts that perform environment detection, provider management, preview serving, and API-backed generation, but it declares no explicit tool scope or allowed-tools boundary. That creates an overprivileged integration surface where file, shell, network, and environment access may be implicitly available without user-visible guardrails.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The top-level description is entirely in Chinese and presents the skill as operating through Chinese-language prompts and outputs, but the document does not say that language is optional or user-selectable. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale limitation is clearly justified.

Vague Triggers

Medium
Confidence
89% confidence
Finding
Broad invocation phrases like ordinary conversational requests can cause the skill to trigger in situations where the user did not intend to authorize generation-related actions. Given the skill's wider-than-advertised capabilities, loose trigger conditions increase the risk of accidental execution of network, file, or shell operations.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The template’s instructions and required follow-up questions are written entirely in Chinese, including mandatory prompts the skill must ask the user. This imposes a specific language for interaction without any opt-in, fallback, or documented region-specific justification, which matches the language/locale policy violation criteria.

YARA rule 'network_reconnaissance': Network reconnaissance and scanning patterns [hacktools]

Medium
Category
YARA Match
Content
aAI 适配)
```
Cinematic slow-motion shot of two samurai warriors locked in a
rain-drenched duel. Camera tracks in a low-angle orbit around them.
The first warrior swings his katana with devastating force, the blade
cutting through sheets of rain. The second warrior parries, sparks
flying from the clash of steel. Rain droplets freeze in mid-air
during the impact moment. The attacker's face shows fierce
determination with gritted teeth, while the defender's expression
shifts from shock to resolute defiance. Rembrandt lighting from
a single paper lantern, teal and orange color grading, water
splashing in volumetric light beams. Photorealistic, 4K quality.
```

### 优化后 Prompt (Runway 适配)
```
Subject: Two samurai warriors in combat stance, katanas clashing
Camera: Low-angle tracking orbit, slow motion at contact point
Lighting: Rembrandt side light from paper lantern, volumetric rain
Style: Photorealistic, cinematic, teal-orange grading
Action: Powerful sword clash, sparks and w
Confidence
65% confidence
Finding
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The file's headings and required follow-up questions are written entirely in Chinese, including the instruction that the system "must proactively ask" users for missing details. This indicates a language-specific interaction pattern without any opt-in, alternative language option, or documented region-specific justification, which matches the language/locale policy violation criteria.

External Transmission

Medium
Category
Data Exfiltration
Content
| 帧率 | 24-60fps |
| 码率建议 | 2-8 Mbps |

**API:** 微博开放平台 `https://api.weibo.com/2/`
- 上传: `statuses/upload_video`
- 认证: OAuth 2.0 Access Token
- 环境变量: `WEIBO_ACCESS_TOKEN`
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 帧率 | 24-60fps |
| 码率建议 | 2-8 Mbps |

**API:** 微博开放平台 `https://api.weibo.com/2/`
- 上传: `statuses/upload_video`
- 认证: OAuth 2.0 Access Token
- 环境变量: `WEIBO_ACCESS_TOKEN`
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The document recommends multiple cloud video-generation providers and includes API endpoints, but it does not clearly warn that prompts, images, videos, and related metadata may be transmitted to third-party services for processing. In a skill focused on media generation, users may submit sensitive creative assets or private media, so omission of a clear disclosure creates a real privacy and compliance risk.

Static analysis

No suspicious patterns detected.