Back to skill

Security audit

Jimeng Video Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its video-generation purpose, but it should be reviewed because it uploads user prompts/images to an external API using credentials and uses an unsafe hard-coded Python dependency path.

Review before installing. Only run it if you are comfortable sending the prompt and both frame images to Volcengine under your VOLC credentials. Prefer running it in an isolated virtual environment with pinned trusted dependencies, and remove or avoid the hard-coded user site-packages path. Do not submit sensitive or regulated images unless that use is approved.

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

Warning
Location
scripts/jimeng_video.py:14
Finding

Unsafe Python Module Search-Path Override Enables Dependency Substitution

Content
View full analysis

Vulnerability Details

File Location: scripts/jimeng_video.py, lines 14–18
Vulnerability Type: Unsafe dependency resolution and Python module path manipulation
Risk Level: Medium

Vulnerable Code

python
sys.path.insert(0, os.path.expanduser('~/.local/lib/python3.12/site-packages'))

from volcenginesdkcore.configuration import Configuration
from volcenginesdkcore.api_client import ApiClient
from volcenginesdkcore.universal import UniversalApi, UniversalInfo

Technical Analysis

The script prepends a hard-coded, user-writable package directory to sys.path. Python resolves imports in search-path order, so any package named volcenginesdkcore in this directory takes precedence over packages from the active interpreter environment.

Consequently, a counterfeit or compromised volcenginesdkcore package can execute arbitrary code as soon as the import statements run. Import execution occurs before credential validation or the main video-generation workflow.

The path is also fixed to Python 3.12. If the script runs under a different interpreter version, it may load an unintended or incompatible package installation rather than the dependency selected by the active environment.

Attack Path

  1. An attacker or compromised package installer places a malicious package at ~/.local/lib/python3.12/site-packages/volcenginesdkcore.
  2. The user invokes scripts/jimeng_video.py.
  3. The script inserts the attacker-influenced directory at index zero of sys.path.
  4. Python resolves the volcenginesdkcore imports from that directory.
  5. Malicious package initialization code executes with the privileges of the user running the skill.
  6. The imported code can access the process environment, including VOLC_ACCESS_KEY and VOLC_SECRET_KEY, and can read or modify files accessible to that user.

Exploitation requires the attacker to influence the specified package directory, such as through a compr ...[truncated 747 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the manual search-path modification:

    python
    # Remove this line:
    sys.path.insert(0, os.path.expanduser('~/.local/lib/python3.12/site-packages'))
    
  2. Install and execute the project in an isolated virtual environment so that standard Python import resolution selects only the environment's declared dependencies.

  3. Add a dependency manifest that pins an approved volcenginesdkcore version. Where supported, use a lock file or hash-verified installation, for example with pip --require-hashes.

  4. Install dependencies only from an explicitly configured, trusted package index. Disable unneeded fallback indexes to reduce dependency-confusion risk.

  5. Run the script with the virtual environment's interpreter rather than relying on packages from a global or user-level site-packages directory.

  6. In deployment environments, make the application and dependency directories non-writable to the runtime identity.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill exposes capabilities that use environment variables and outbound network access but does not declare any tool scope or permissions boundary. This creates a transparency and least-privilege problem: a user or host system may invoke the skill without clear disclosure that secrets will be read and data will be sent to an external service.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The trigger phrases are broad terms like '视频生成' and '即梦', which can match ordinary user requests and cause the skill to activate unexpectedly. In this skill, unexpected activation is more concerning because it can lead to reading configured API credentials and sending user prompts or image paths/URLs to an external video-generation API without strong user intent confirmation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill describes prompt and image inputs but does not warn users that these inputs are transmitted to Volcengine's external API. This is a real privacy and data-handling issue because users may provide sensitive images or text under the assumption processing is local, when in fact content leaves the local environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script sends the user prompt and both input images to Volcengine’s external API, but it gives no explicit privacy or network disclosure at runtime beyond normal status prints. In a skill context, users may assume processing is local; undisclosed transmission of potentially sensitive images and prompts can cause privacy exposure, compliance issues, or accidental leakage of confidential content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This markdown guide is entirely written in Chinese and presents prescriptive instructions such as '用完整句子写' and fixed prompt templates without indicating that other languages are supported. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file’s user-facing description and runtime messages are written exclusively in Chinese, and there is no indication that the skill is intentionally limited to a Chinese-speaking or region-specific audience. Under the stated policy, forcing a specific language without user opt-in is a locale-policy concern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest description focuses on generating video through the Volcano Engine Jimeng API in first/last-frame mode. In addition to submitting and polling generation tasks, the code automatically retrieves the returned video URL and writes the resulting file into a local workspace, which is a broader behavior than pure API-based generation.

Content

No source excerpt is available for this finding.