Back to skill

Security audit

AI Video Generation - 视频创作 - 聚合数据

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says: it uses a Juhe API key to generate videos, polls the service, and saves the finished MP4 locally, with some credential-handling cautions users should follow.

Install only if you are comfortable sending prompts, image URLs or base64 images, optional audio URLs, and your Juhe API key to the Juhe video service. Prefer JUHE_VIDEO_KEY over --key, avoid committing scripts/.env, consider using --no-download when you only need a link, and choose the output directory deliberately because generated videos are saved locally by default.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/video_generate.py:317
Finding

API Key Exposure Through Command-Line Arguments

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (9)

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

The documentation encourages storing the API key in a plaintext scripts/.env file within the project directory. Plaintext secrets in working directories are commonly exposed through accidental commits, backups, logs, or overly broad file access by other tools.

Content

Scanner excerpt · SKILL.md (reported line 32)May include surrounding context.

md
# 方式一:环境变量(推荐,一次配置永久生效)
export JUHE_VIDEO_KEY=你的AppKey

# 方式二:.env 文件(在脚本目录创建)
echo "JUHE_VIDEO_KEY=你的AppKey" > scripts/.env

# 方式三:每次命令行传入

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

The example shows passing the API key directly on the command line with --key, which can leak secrets via shell history, process listings, audit logs, and agent telemetry. In multi-user or monitored environments, command-line arguments are a well-known secret exposure channel.

Content

Scanner excerpt · SKILL.md (reported line 33)May include surrounding context.

md
export JUHE_VIDEO_KEY=你的AppKey

# 方式二:.env 文件(在脚本目录创建)
echo "JUHE_VIDEO_KEY=你的AppKey" > scripts/.env

# 方式三:每次命令行传入
python scripts/video_generate.py --key 你的AppKey "夕阳下的海边"

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/video_generate.py (reported line 21)May include surrounding context.

python
API Key 配置(任选其一,优先级从高到低):
    1. 环境变量: export JUHE_VIDEO_KEY=your_api_key
    2. 脚本同目录的 .env 文件: JUHE_VIDEO_KEY=your_api_key
    3. 直接传参: python video_generate.py --key your_api_key "提示词"

免费申请 API Key: https://www.juhe.cn/docs/api/id/827

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/video_generate.py (reported line 452)May include surrounding context.

python
API Key 配置(任选其一,优先级从高到低):
    1. 环境变量: export JUHE_VIDEO_KEY=your_api_key
    2. 脚本同目录的 .env 文件: JUHE_VIDEO_KEY=your_api_key
    3. 直接传参: python video_generate.py --key your_api_key "提示词"

免费申请 API Key: https://www.juhe.cn/docs/api/id/827

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/video_generate.py (reported line 62)May include surrounding context.

python
if env_key:
        return env_key

    env_file = Path(__file__).parent / ".env"
    if env_file.exists():
        for line in env_file.read_text(encoding="utf-8").splitlines():
            line = line.strip()

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill documents access to environment variables, local file output, and network/API usage, but it does not declare any explicit tool scope or allowed-tools boundary. That omission weakens least-privilege controls and can cause the agent runtime to grant broader capabilities than users or reviewers expect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill states that generated MP4 files are automatically downloaded to local storage, but it does not clearly warn about persistence, naming collisions, disk usage, or where sensitive/generated content will be stored. Automatic local writes are risky in agent contexts because they create side effects beyond returning a result to the user.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The trigger guidance is broad enough to match common requests like 'create/generate/make a video,' which increases the chance of accidental invocation. In an agent environment, overbroad activation can lead to unintended network calls, billing consumption, and local file writes without sufficiently specific user intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code file contains natural-language instructions, usage text, and operational messages entirely in Chinese, and there is no indication that the skill is region-specific or that users can opt into another language. Under the policy, forcing a specific language without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.