Back to skill

Security audit

短视频一键生成器

Security checks for vulnerabilities and agentic risk

Overview

This video-generation skill matches its stated purpose, but it needs review because user-provided content can reach shell commands and API credentials/content can be sent to configurable external services.

Review before installing. Use it only in a sandboxed working directory, avoid processing untrusted video text or output paths, do not set OPENAI_BASE to an untrusted proxy, and prefer a version that removes shell=True, validates API hosts, and clearly documents what content and credentials are sent to MiniMax/OpenAI/Edge services.

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
video_producer.py:66
Finding

Command Injection Through Shell-Based Edge TTS and FFmpeg Execution

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
video_producer.py:53
Finding

OpenAI API Credentials and User Content Can Be Sent to an Arbitrary Configured Host

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (32)

Tainted flow: 'MINIMAX_API_KEY' from os.environ.get (line 45, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · video_producer.py (reported line 193)May include surrounding context.

python
for attempt in range(retries + 1):
        try:
            resp = requests.post(
                f"{MINIMAX_BASE}/image_generation",
                headers={
                    "Authorization": f"Bearer {MINIMAX_API_KEY}",

Tainted flow: 'OPENAI_BASE' from os.environ.get (line 53, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The code reads OPENAI_BASE from the environment and then sends the OpenAI API key in an Authorization header to that URL. If an attacker can influence environment configuration, the skill will exfiltrate the credential to an arbitrary server, making this a credential-leak/SSRF-style risk rather than a normal API call.

Content

Scanner excerpt · video_producer.py (reported line 247)May include surrounding context.

python
for attempt in range(retries + 1):
        try:
            resp = requests.post(
                f"{OPENAI_BASE}/images/generations",
                headers={
                    "Authorization": f"Bearer {OPENAI_API_KEY}",

Tainted flow: 'MINIMAX_TTS_VOICE' from os.environ.get (line 50, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · video_producer.py (reported line 318)May include surrounding context.

python
for attempt in range(retries + 1):
        try:
            resp = requests.post(
                f"{MINIMAX_BASE}/text_to_speech",
                headers={
                    "Authorization": f"Bearer {MINIMAX_API_KEY}",

Tainted flow: 'OPENAI_BASE' from os.environ.get (line 53, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

As with image generation, OPENAI_BASE is environment-controlled and used as the destination for authenticated requests carrying the OpenAI API key. A maliciously set base URL would cause secret disclosure to an attacker-controlled endpoint and may also send user content off-platform unexpectedly.

Content

Scanner excerpt · video_producer.py (reported line 370)May include surrounding context.

python
for attempt in range(retries + 1):
        try:
            resp = requests.post(
                f"{OPENAI_BASE}/audio/speech",
                headers={
                    "Authorization": f"Bearer {OPENAI_API_KEY}",

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 · README.md (reported line 34)May include surrounding context.

复制 .env.example 为 .env,填入你的 API Key:

bash
cp .env.example .env
# 编辑 .env 文件

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 · README.md (reported line 35)May include surrounding context.

bash
cp .env.example .env
# 编辑 .env 文件

或者直接设置环境变量:

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 · video_producer.py (reported line 38)May include surrounding context.

python
```bash
cp .env.example .env
# 编辑 .env 文件
```

或者直接设置环境变量:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The generic command runner executes arbitrary strings via the shell, which is a classic tool-parameter abuse sink. Since later call sites construct commands from scene text and subtitle content derived from user input, an attacker can potentially inject shell syntax and execute unintended commands.

Content

Scanner excerpt · video_producer.py (reported line 69)May include surrounding context.

python
def run_cmd(cmd, timeout=120):
    """运行命令,返回 (ok, stdout)"""
    try:
        r = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout)
        return r.returncode == 0, r.stdout.strip()
    except subprocess.TimeoutExpired:
        return False, "Timeout"

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This path invokes an external CLI through the shell using text ultimately derived from the user-provided content. Because the skill is designed to transform arbitrary user topics and points into media, this context makes command injection materially more plausible and dangerous.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

The Edge TTS call exposes a direct shell sink reachable by attacker-controlled narration text. The attempted quote escaping is incomplete and brittle, so crafted input can break command boundaries or trigger shell expansions, leading to arbitrary command execution.

Content

Scanner excerpt · video_producer.py (reported line 414)May include surrounding context.

python
# edge-tts 命令行
            safe_text = text.replace('"', '\\"').replace("'", "\\'")
            cmd = f'edge-tts --voice zh-CN-XiaoxiaoNeural --text "{safe_text}" --write-media "{output_path}"'
            result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=60)
            if result.returncode == 0 and Path(output_path).exists():
                size_kb = Path(output_path).stat().st_size / 1024
                log(f"  🔊 Edge TTS: {Path(output_path).name} ({size_kb:.0f}KB)")

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 25)May include surrounding context.

FFmpeg (如果没有)

macOS: brew install ffmpeg

Ubuntu: sudo apt install ffmpeg

Windows: choco install ffmpeg

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README instructs users to configure API keys and use third-party AI backends, but it does not clearly warn that user-provided topics, points, prompts, and generated media may be transmitted to external providers. In a content-generation skill, this can expose sensitive business ideas, personal data, or proprietary content to outside services without informed consent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 135)May include surrounding context.

md
| `MINIMAX_API_KEY` | `` | MiniMax API Key |
| `MINIMAX_TTS_VOICE` | `female-yujie` | MiniMax 配音角色 |
| `OPENAI_API_KEY` | `` | OpenAI API Key |
| `OPENAI_BASE` | `https://api.openai.com/v1` | OpenAI API 地址 (可换代理) |
| `OPENAI_TTS_VOICE` | `alloy` | OpenAI 配音: alloy/echo/fable/nova/shimmer |
| `OPENAI_IMAGE_MODEL` | `dall-e-3` | OpenAI 图片模型 |

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises capabilities that imply environment variable access, disk writes, network calls, and shell/FFmpeg execution, but it declares no explicit tool scope or permission boundaries. In an agent ecosystem, this creates overbroad implicit authority: a user or host may invoke the skill without realizing it can transmit data externally, write arbitrary files, and run commands.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill description promotes fully automated image generation, TTS, subtitles, and rendering but does not warn that user-provided content may be sent to an external API and that multiple generated media artifacts will be written to disk. This is dangerous because users may supply sensitive or proprietary content under the false assumption that processing is local and ephemeral.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description states '中文字幕自动适配', which fixes subtitle output to Chinese. This is a natural-language locale constraint and no opt-in, configuration choice, or region-specific justification is provided elsewhere in the file.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The changelog claims the skill is 'self-contained' and has 'no external dependencies', while the rest of the document clearly requires a MiniMax API key, network access, Python packages, and FFmpeg. This kind of contradictory security disclosure can mislead users and reviewers into underestimating data egress, third-party exposure, and execution requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file’s natural-language description and usage are entirely in Chinese, and later execution also defaults to a Chinese Edge TTS voice, presenting the skill as Chinese-only behavior. This is a locale/language policy concern because the skill does not document user choice or opt-in for language selection.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · video_producer.py (reported line 49)May include surrounding context.

python
OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY", "")

# MiniMax 配置
MINIMAX_BASE = "https://api.minimaxi.com/v1"
MINIMAX_TTS_VOICE = os.environ.get("MINIMAX_TTS_VOICE", "female-yujie")

# OpenAI 配置

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

Allowing the API base URL to come from the environment is dangerous in a credentialed client because it changes where secrets and user data are transmitted. In this skill, that configuration directly affects authenticated image and TTS requests, amplifying the impact.

Content

Scanner excerpt · video_producer.py (reported line 53)May include surrounding context.

python
MINIMAX_TTS_VOICE = os.environ.get("MINIMAX_TTS_VOICE", "female-yujie")

# OpenAI 配置
OPENAI_BASE = os.environ.get("OPENAI_BASE", "https://api.openai.com/v1")
OPENAI_TTS_VOICE = os.environ.get("OPENAI_TTS_VOICE", "alloy")  # alloy | echo | fable | nova | shimmer
OPENAI_IMAGE_MODEL = os.environ.get("OPENAI_IMAGE_MODEL", "dall-e-3")

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill has broad shell-execution capability through a generic wrapper, and that wrapper is used with dynamically assembled FFmpeg command strings. In this context, the capability is more dangerous because user content flows into the command construction path, increasing the chance of arbitrary command execution.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
98% confidence
Finding

The helper uses subprocess.run with shell=True on a string command, and it is later fed FFmpeg commands assembled from user-controlled fields such as topic, title, and script text. Because shell metacharacters are interpreted by the shell, an attacker can inject additional commands and achieve arbitrary command execution on the host running the skill.

Content

Scanner excerpt · video_producer.py (reported line 69)May include surrounding context.

python
def run_cmd(cmd, timeout=120):
    """运行命令,返回 (ok, stdout)"""
    try:
        r = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout)
        return r.returncode == 0, r.stdout.strip()
    except subprocess.TimeoutExpired:
        return False, "Timeout"

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · video_producer.py (reported line 193)May include surrounding context.

python
for attempt in range(retries + 1):
        try:
            resp = requests.post(
                f"{MINIMAX_BASE}/image_generation",
                headers={
                    "Authorization": f"Bearer {MINIMAX_API_KEY}",

Tainted flow: 'img_url' from requests.post (line 263, network input) → requests.get (network output)

Medium
Category
Data Flow
Confidence
86% confidence
Finding

The code downloads a URL returned by the upstream API without validating the scheme, host, or IP destination. If the provider response is compromised or manipulated, this can turn the skill into an SSRF primitive or force downloads from unexpected internal or local addresses.

Content

Scanner excerpt · video_producer.py (reported line 212)May include surrounding context.

python
data = resp.json()
            if data.get("base_resp", {}).get("status_code") == 0:
                img_url = data["data"]["image_urls"][0]
                img_resp = requests.get(img_url, timeout=30)
                if img_resp.status_code == 200:
                    with open(output_path, "wb") as f:
                        f.write(img_resp.content)

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

Although outbound transmission is expected, this particular request is dangerous because the destination host is configurable via OPENAI_BASE while carrying a bearer token. That creates a realistic path for secret exfiltration and unauthorized third-party data transfer.

Content

Scanner excerpt · video_producer.py (reported line 247)May include surrounding context.

python
for attempt in range(retries + 1):
        try:
            resp = requests.post(
                f"{OPENAI_BASE}/images/generations",
                headers={
                    "Authorization": f"Bearer {OPENAI_API_KEY}",