Back to skill

Security audit

Universal Video Analyzer Zh

Security checks for vulnerabilities and agentic risk

Overview

This skill performs the advertised video analysis, but it can automatically send sensitive video frames and transcripts to a configurable external API and writes unescaped HTML reports.

Install only if you are comfortable sending video frames, speech transcripts, prompts, and your model API key to the configured provider. Use a trusted HTTPS endpoint, avoid auto-analysis for sensitive chats or unknown attachments, and treat generated HTML reports as untrusted until the skill escapes or sanitizes model and transcript content.

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
doubao_video_analyzer.py:71
Finding

Unrestricted API Endpoint Can Exfiltrate Credentials and Private Video Content

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
doubao_video_analyzer.py:302
Finding

Stored HTML Injection Through Unescaped Model and Transcript Content

Content
View full analysis
").replace("#", "\n#") transcript_html = transcript.replace("\n", "
") if transcript != "(无音频或识别失败)" else "无音频内容" ``` ```python {BASE_NAME} - 视频分析报告 ``` ```python
{analysis_html}
``` ```python
{transcript_html}
``` The same generated document also interpolates other dynamic values without HTML escaping: ```python
📁 文件名{VIDEO_PATH.name}
🤖 模型{MODEL}
``` ### Technical Analysis The generated HTML report directly interpolates data from several untrusted or externally influenced sources: - `final_output`, returned by the remote multimodal model. - `transcript`, derived from attacker-controlled video audio. - `VIDEO_PATH.name` and `BASE_NAME`, derived from the input filename. - `MODEL`, supplied through the environment. Replacing newline characters with `
` does not escape HTML metacharacters and does not neutralize elements such as `
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (36)

Tainted flow: 'headers' from os.environ.get (line 219, 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 · doubao_video_analyzer.py (reported line 236)May include surrounding context.

python
retry=retry_if_exception_type((requests.exceptions.ConnectionError, requests.exceptions.Timeout))
        )
        def call_api():
            resp = requests.post(f"{BASE_URL}/chat/completions", headers=headers, json=payload, timeout=60)
            resp.raise_for_status()
            return resp.json()

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The README describes automatic video analysis, frame extraction, speech transcription, and use of external model APIs, but does not clearly warn that video/audio content may be transmitted to third-party providers. Because videos and speech often contain personal, confidential, or regulated data, the absence of a privacy notice creates a significant data exposure risk.

Content

No source excerpt is available for this finding.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

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

::SetEnvironmentVariable("VIDEO_ANALYZER_API_KEY", "你的API密钥", "User") [Environment]::SetEnvironmentVariable("VIDEO_ANALYZER_MODEL", "doubao-seed-2-0-pro-260215", "User") [Environment]::SetEnvironmentVariable("VIDEO_ANALYZER_BASE_URL", "https://ark.cn-beijing.volces.com/api/v3", "User")

text
设置后重启终端即可生效。

**Linux/macOS**:追加到 `~/.bashrc` 或 `~/.zshrc`
```bash
echo 'export VIDEO_ANALYZER_API_KEY="你的API密钥"' >> ~/.bashrc
echo 'export VIDEO_ANALYZER_MODEL="doubao-seed-2-0-pro-260215"' >> ~/.bashrc
source ~/.bashrc

方式三:.env 文件(最方便)

在技能目录下创建 .env 文件:

text
VIDEO_ANALYZER_API_KEY=你的API密钥
VIDEO_ANALYZER_MODEL=doubao-seed-2-0-pro-260215
VIDEO_ANALYZER_BASE_URL=https://ark.cn-beijing.volces.com/api/v3

🚀 支持的多模态模型

模型提供商MODEL 值BASE_URLAPI Key 申请
豆包doubao-seed-2-0-pro-260215`h

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The WeChat auto-trigger workflow instructs users to send message attachments for automatic analysis but omits any warning that attachments and derived transcripts may be processed and potentially sent to external APIs. In a messaging environment, this omission is especially dangerous because users may assume chat attachments remain private to the conversation.

Content

No source excerpt is available for this finding.

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 30)May include surrounding context.

md
openai-whisper>=20231106
torch>=2.0.0

# 可选依赖(支持 .env 文件)
python-dotenv>=1.0.0

# 优化依赖(API 重试、图像处理)

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 68)May include surrounding context.

md
openai-whisper>=20231106
torch>=2.0.0

# 可选依赖(支持 .env 文件)
python-dotenv>=1.0.0

# 优化依赖(API 重试、图像处理)

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 136)May include surrounding context.

md
openai-whisper>=20231106
torch>=2.0.0

# 可选依赖(支持 .env 文件)
python-dotenv>=1.0.0

# 优化依赖(API 重试、图像处理)

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

python
openai-whisper>=20231106
torch>=2.0.0

# 可选依赖(支持 .env 文件)
python-dotenv>=1.0.0

# 优化依赖(API 重试、图像处理)

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 · requirements.txt (reported line 9)May include surrounding context.

text
openai-whisper>=20231106
torch>=2.0.0

# 可选依赖(支持 .env 文件)
python-dotenv>=1.0.0

# 优化依赖(API 重试、图像处理)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README states that the skill generates a structured Chinese report, which imposes a specific language behavior by default. There is no indication that users can choose another output language or explicitly opt into Chinese-only responses.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README advertises '零门槛使用' and automatic triggering from WeChat video messages without defining scope, authorization boundaries, or exclusions. In a messaging context, broad auto-activation can cause unintended processing of any received video, increasing the chance of privacy violations, surprise execution, and abuse through unsolicited content.

Content

No source excerpt is available for this finding.

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 37)May include surrounding context.

md
### 3. 安装 ffmpeg
- **Windows**: `winget install Gyan.FFmpeg` 或从 [ffmpeg.org](https://ffmpeg.org/download.html) 下载
- **macOS**: `brew install ffmpeg`
- **Linux**: `sudo apt install ffmpeg`

## ⚙️ 配置

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The invocation instructions say users can 'directly send a video file in WeChat' and analysis will auto-trigger, but do not describe any gating or consent mechanism. In a chat-integrated skill, that makes the trigger surface extremely broad and can lead to accidental processing of sensitive attachments.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The core usage scenario repeats the claim that simply sending a video file will automatically return an analysis report, again without exceptions or opt-in controls. Repetition of broad auto-trigger behavior in a skill intended for messaging platforms raises the risk that operators deploy it without considering minimum-necessary activation constraints.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares broad capabilities in practice (environment variable access, shell execution, network access, and local file writes) but does not declare any explicit tool scope or permissions. This weakens reviewability and containment because consumers cannot easily understand or restrict what the skill will do before execution, especially since it sends video-derived data to external APIs and writes reports locally.

Content

No source excerpt is available for this finding.

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

2. 安装 ffmpeg(必需)

Windows: winget install Gyan.FFmpeg

macOS: brew install ffmpeg

Linux: sudo apt install ffmpeg

3. 首次运行会自动下载 Whisper 模型(约150MB),请确保网络畅通

text

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

python
def get_video_duration(video_path: Path) -> float:
    """获取视频时长(秒)"""
    try:
        result = subprocess.run(
            ["ffprobe", "-v", "error", "-show_entries", "format=duration",
             "-of", "default=noprint_wrappers=1:nokey=1", str(video_path)],
            capture_output=True, text=True, timeout=10

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

python
# 1. 抽关键帧(I帧)
        logger.info("⏳ 正在提取关键帧...")
        try:
            subprocess.run(
                ["ffmpeg", "-i", str(VIDEO_PATH),
                 "-vf", "select='eq(pict_type,I)'",
                 "-vsync", "vfr",

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

python
# 2. 提取音频
        logger.info("⏳ 正在提取音频...")
        try:
            subprocess.run(
                ["ffmpeg", "-i", str(VIDEO_PATH),
                 "-ac", "1", "-ar", "16000",
                 str(AUDIO_PATH)],

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The tool sends extracted video frames and audio transcript content to a remote multimodal API without an explicit in-script warning or consent step. Because videos often contain sensitive images, speech, and personal data, transmitting them off-host to a third party is a significant privacy and data-governance risk in this context.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

This network call transmits user-derived content—prompt text, audio transcript, and base64-encoded video frames—to an external service. In a video-analysis skill this behavior is functionally expected, but it is still security-relevant because it exports potentially sensitive material to a third party and therefore requires strong disclosure and trust controls.

Content

Scanner excerpt · doubao_video_analyzer.py (reported line 236)May include surrounding context.

python
retry=retry_if_exception_type((requests.exceptions.ConnectionError, requests.exceptions.Timeout))
        )
        def call_api():
            resp = requests.post(f"{BASE_URL}/chat/completions", headers=headers, json=payload, timeout=60)
            resp.raise_for_status()
            return resp.json()

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script persists extracted keyframes and an HTML visualization to disk, which expands data retention beyond the core analysis described and may unexpectedly store sensitive visual content. In a video-analysis tool, frames can contain personal, confidential, or regulated information, so silent long-term export increases privacy and leakage risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring states that it generates a structured Chinese report, and later the HTML markup hard-codes the zh-CN locale. This imposes a language/locale preference without offering users a choice, which matches the policy category for language or locale violations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The code comments and structure imply temporary data is automatically cleaned up, but later copies keyframes to a persistent output directory. This mismatch can mislead users into believing sensitive frame data is ephemeral when it is actually retained, creating a transparency and privacy problem.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This markdown file presents all instructions and warnings exclusively in Chinese, and it does not indicate that the skill is region-specific or provide an opt-in language choice. Under the policy, forcing a specific language without user choice can be a natural-language policy violation.

Content

No source excerpt is available for this finding.