Back to skill

Security audit

Video Metadata Intelligence System

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to do the advertised video analysis, but API modes handle sensitive media and API keys in ways users should review carefully before use.

Use local or agent-direct modes for private videos. If using API modes, only use HTTPS endpoints you trust, prefer environment variables or a secret manager over command-line keys, and rotate any key that may have been exposed in command history or logs.

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

Warning
Location
scripts/visual.py:174
Finding

User-configured API endpoints allow plaintext transmission of credentials and sensitive media

Content
View full analysis
str: """调用 OpenAI 兼容 API(带重试)""" payload = {"model": model, "messages": messages, "max_tokens": 6000, "temperature": 0.3} req_data = json.dumps(payload).encode("utf-8") req = urllib.request.Request( f"{api_base.rstrip('/')}/chat/completions", data=req_data, headers={"Content-Type": "application/json", "Authorization": f"Bearer {api_key}"} ) resp_data = http_request_with_retry(req, timeout=180, label=f"Vision LLM ({model})") ``` The same pattern is used for audio: ```python url = f"{api_base.rstrip('/')}/audio/transcriptions" req = urllib.request.Request( url, data=body, headers={"Content-Type": f"multipart/form-data; boundary={boundary}", "Authorization": f"Bearer {api_key}"} ) ``` And for metadata synthesis: ```python req = urllib.request.Request( f"{api_base.rstrip('/')}/chat/completions", data=json.dumps(payload).encode('utf-8'), headers={"Content-Type":"application/json","Authorization":f"Bearer {api_key}"} ) ``` ### Technical Analysis The scripts accept an arbitrary API base URL and append an API path without parsing or validating the URL scheme. Consequently, an endpoint beginning with `http://` is accepted. These requests include a bearer API key and one or more sensitive content types: - Encoded video frames - Extracted audio - Complete transcripts - Derived visual observations - Generated publishing metadata Base64 encoding in `visual.py` and `transcribe.py` is normal API serialization and is not encryption. If the configured endpoint uses pla ...[truncated 1554 chars]
Remediation
View remediation
str: parsed = urlparse(api_base) local_hosts = {"localhost", "127.0.0.1", "::1"} if parsed.scheme == "https" and parsed.hostname: return api_base.rstrip("/") if ( allow_insecure_localhost and parsed.scheme == "http" and parsed.hostname in local_hosts ): return api_base.rstrip("/") raise ValueError("API endpoint must use HTTPS") ``` Apply this validation consistently in `visual.py`, `transcribe.py`, and `analyze.py`. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/run.sh:50
Finding

API keys are exposed through command-line arguments and recommended insecurely in documentation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (30)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

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

md
三种合成方式 / Three synthesis methods:
- `api` 🌐 — 调 LLM 生成(推荐),失败自动退到启发式规则 / Call LLM (recommended), auto-fallback to heuristics on failure
- `agent` — 输出 prompt 文件,Agent 用自己的模型生成 / Output prompt file, Agent generates with its own model
- `manual` — 输出 Markdown 供人工审阅 / Output Markdown for manual review

## 🛡️ 三层容错 / Three-Layer Fault Tolerance

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description promises a broader end-to-end video analysis and metadata generation pipeline, including frame extraction, multimodal visual+audio LLM analysis, and generation of Bilibili publishing metadata. The supplied code chunk does not do those things. It is narrowly focused on audio handling: extracting audio from a video, optionally compressing/splitting it, sending it to Whisper or an audio-input LLM, parsing structured audio observations, and writing those results to JSON. While the privacy note about external audio transmission is consistent with parts of the code, the actual behavior is only one supporting component of the declared system, not an implementation of the stated end-user skill. Therefore the description does not accurately represent what this code chunk itself actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents an end-to-end video metadata analysis pipeline covering frame extraction, audio transcription, multimodal analysis, and generation of structured Bilibili publishing metadata. The supplied code chunk is much narrower: it extracts frames, optionally calls an external vision-capable LLM with those images, parses JSON observations, and saves visual observation output. Although this is consistent with one component of the declared pipeline (frame extraction and visual analysis), it does not implement the larger stated purpose, especially audio transcription and metadata synthesis. Therefore the description materially overstates what this code chunk actually does.

Content

No source excerpt is available for this finding.

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

Scanner excerpt · references/REFERENCE.md (reported line 6)May include surrounding context.

md
> Complete parameter reference, output schemas, standalone usage, and error handling details.
> This file is loaded on demand when the agent needs deep technical details.

> ⚠️ **Privacy:** Modes marked 🌐 send data to external endpoints. See [SKILL.md Privacy Notice](../SKILL.md) for details.

## Complete Parameter Reference

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · references/REFERENCE.md (reported line 258)May include surrounding context.

md
python3 scripts/analyze.py \
  --observations-visual obs_v.json --observations-audio obs_a.json \
  --output metadata.json --method api \
  --api-key KEY --api-base URL --model gpt-5.5

# Agent mode
python3 scripts/analyze.py \

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill description states that the system generates a complete Bilibili publishing package, and the examples and output schema are consistently tied to Bilibili-specific metadata. This imposes a platform/locale-specific content format by default without stating that users can choose another language, platform, or locale, which is a natural-language policy concern.

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

md
bash scripts/run.sh \
  --video 你的视频.mp4 --output /tmp/output \
  --transcribe audio-llm \
  --audio-llm-key YOUR_KEY --audio-llm-base https://api.example.com/v1 --audio-llm-model mimo-v2.5 \
  --vision-llm-key YOUR_KEY --vision-llm-base https://api.example.com/v1 --vision-llm-model mimo-v2.5 \
  --max-frames 15 \
  --synthesize-method api \

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

md
bash scripts/run.sh \
  --video 你的视频.mp4 --output /tmp/output \
  --transcribe audio-llm \
  --audio-llm-key YOUR_KEY --audio-llm-base https://api.example.com/v1 --audio-llm-model mimo-v2.5 \
  --vision-llm-key YOUR_KEY --vision-llm-base https://api.example.com/v1 --vision-llm-model mimo-v2.5 \
  --max-frames 15 \
  --synthesize-method api \

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

md
bash scripts/run.sh \
  --video 你的视频.mp4 --output /tmp/output \
  --transcribe audio-llm \
  --audio-llm-key YOUR_KEY --audio-llm-base https://api.example.com/v1 --audio-llm-model mimo-v2.5 \
  --vision-llm-key YOUR_KEY --vision-llm-base https://api.example.com/v1 --vision-llm-model mimo-v2.5 \
  --max-frames 15 \
  --synthesize-method api \

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 · references/REFERENCE.md (reported line 408)May include surrounding context.

md
bash scripts/run.sh \
  --video 你的视频.mp4 --output /tmp/output \
  --transcribe audio-llm \
  --audio-llm-key YOUR_KEY --audio-llm-base https://api.example.com/v1 --audio-llm-model mimo-v2.5 \
  --vision-llm-key YOUR_KEY --vision-llm-base https://api.example.com/v1 --vision-llm-model mimo-v2.5 \
  --max-frames 15 \
  --synthesize-method api \

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 · references/REFERENCE.md (reported line 409)May include surrounding context.

md
bash scripts/run.sh \
  --video 你的视频.mp4 --output /tmp/output \
  --transcribe audio-llm \
  --audio-llm-key YOUR_KEY --audio-llm-base https://api.example.com/v1 --audio-llm-model mimo-v2.5 \
  --vision-llm-key YOUR_KEY --vision-llm-base https://api.example.com/v1 --vision-llm-model mimo-v2.5 \
  --max-frames 15 \
  --synthesize-method api \

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 · references/REFERENCE.md (reported line 412)May include surrounding context.

md
bash scripts/run.sh \
  --video 你的视频.mp4 --output /tmp/output \
  --transcribe audio-llm \
  --audio-llm-key YOUR_KEY --audio-llm-base https://api.example.com/v1 --audio-llm-model mimo-v2.5 \
  --vision-llm-key YOUR_KEY --vision-llm-base https://api.example.com/v1 --vision-llm-model mimo-v2.5 \
  --max-frames 15 \
  --synthesize-method api \

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill advertises capabilities that involve shell execution, filesystem access, and outbound network/API use, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates a least-privilege and transparency problem: a host agent may grant broader access than users expect, increasing the chance of unsafe file access, command execution, or data exfiltration during video processing.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · references/REFERENCE.md (reported line 6)May include surrounding context.

md
> Complete parameter reference, output schemas, standalone usage, and error handling details.
> This file is loaded on demand when the agent needs deep technical details.

> ⚠️ **Privacy:** Modes marked 🌐 send data to external endpoints. See [SKILL.md Privacy Notice](../SKILL.md) for details.

## Complete Parameter Reference

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The reference requires the visual desc field to be a Chinese paragraph, which imposes a specific language on generated output. Because the file does not present this as optional or region-specific with user opt-in, it conflicts with the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The transcript field description explicitly requires Chinese output and the surrounding schema examples continue that locale assumption. This is a natural-language policy issue because the skill constrains language behavior without offering a user choice or documenting a justified regional limitation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The docstring for synthesize_agent says agent mode does not call APIs and uses heuristic rules to generate basic metadata. However, the actual main() branch for --method agent does not call synthesize_agent; instead it writes out a full prompt for an external/current agent to read and generate metadata.json, which is materially different behavior and may involve a remote model depending on the runtime agent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The embedded system and user prompts require generation of B站投稿元数据, use B站-specific categories and declarations, and present Chinese platform norms as mandatory output behavior. This is a natural-language locale/platform policy constraint imposed by the skill itself, with no user choice or explicit justification that the skill is region-specific only.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest presents the skill as a video metadata analysis pipeline that synthesizes structured Bilibili publish metadata. In agent mode, the code writes a markdown-like prompt containing observations and instructions for some other agent to generate metadata later, so the skill itself does not perform the promised synthesis in that mode.

Content

No source excerpt is available for this finding.

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 · scripts/common.py (reported line 42)May include surrounding context.

python
def get_media_duration(path: str) -> float:
    """获取音频/视频文件时长(秒)"""
    result = subprocess.run(
        ["ffprobe", "-v", "quiet", "-print_format", "json", "-show_format", path],
        capture_output=True, text=True
    )

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This shell script includes core descriptive comments and stage labels in Chinese, and the file provides no opt-in, alternative locale, or justification that the skill is region-specific. That creates a natural-language locale policy concern because users may be forced into a specific language experience without choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code file contains natural-language instructions entirely in Chinese, including usage text and model prompts, and the prompt schema specifies Chinese example values and labels. The file does not offer a language choice or explain that the skill is intentionally limited to a Chinese-speaking context, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

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 · scripts/transcribe.py (reported line 53)May include surrounding context.

python
else:
        cmd = ["ffmpeg", "-y", "-i", video_path, "-vn",
               "-acodec", "pcm_s16le", "-ar", "16000", "-ac", "1", audio_path]
    result = subprocess.run(cmd, capture_output=True, text=True)
    if result.returncode != 0:
        print(f"Audio extraction failed: {result.stderr}", file=sys.stderr)
        return False

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 · scripts/transcribe.py (reported line 63)May include surrounding context.

python
def compress_audio(audio_path: str, output_path: str, bitrate: str = "128k") -> bool:
    """将音频压缩为 MP3"""
    result = subprocess.run(
        ["ffmpeg", "-y", "-i", audio_path, "-vn", "-acodec", "libmp3lame", "-b:a", bitrate, output_path],
        capture_output=True, text=True
    )

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 · scripts/transcribe.py (reported line 85)May include surrounding context.

python
"-ss", str(start), "-t", str(chunk_seconds),
            "-vn", "-acodec", "libmp3lame", "-b:a", "128k", chunk_path
        ]
        subprocess.run(cmd, capture_output=True, text=True)
        if os.path.exists(chunk_path) and os.path.getsize(chunk_path) > 0:
            chunks.append(chunk_path)
        idx += 1

Static analysis

No suspicious patterns detected.