Back to skill

Security audit

视频解说总入口

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked this skill suspicious because scanners reported unsafe file-path handling and project-controlled paths that may reach outside the dashboard root; the review is based on incomplete coverage.

Treat this as a review-required skill, not as proof of malicious intent. Before installing, review the file-path and dashboard-root concerns, and decide whether the documented external services may receive your media, context, or credentials. Skillspector inspected 115 of 120 components and reported partial coverage, including some files or analysis stages it could not fully interpret, so the evidence is incomplete.

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/materials.py
Finding

Unvalidated cached artifact names permit path traversal and unauthorized file replacement

Content
View full analysis

Impact

For example, an artifact name of ../settings.json reads /settings.json. Because the temporary directory is immediately beneath work_dir, staging writes the supplied JSON to work_dir/settings.json; the final replace moves it to work_dir/../settings.json, overwriting an existing writable file there. The same missing allowlist also permits restoring files other than the documented analysis artifacts. File corruption or unauthorized configuration replacement is possible within the process's filesystem permissions.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (40)

Tainted flow: 'req' from os.environ.get (line 668, credential/environment) → urllib.request.urlopen (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 · scripts/lib.py (reported line 669)May include surrounding context.

python
for attempt in range(max_retries):
        try:
            req = urllib.request.Request(endpoint, data=data, headers=headers)
            with urllib.request.urlopen(req, timeout=timeout) as resp:
                return json.loads(resp.read().decode("utf-8"))
        except urllib.error.HTTPError as e:
            body = _sanitize_api_error(e.read().decode("utf-8", errors="replace"))

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
80% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/packaging_fonts.py (reported line 195)May include surrounding context.

python
("msyh", "Microsoft YaHei"),
        ("simhei", "SimHei"),
    ):
        if token in name:
            return family, path
    return None, path

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/recap_runtime.py (reported line 29)May include surrounding context.

python
# Stage scripts log Chinese; on Windows a piped stdout defaults to cp1252 and the
    # first log line would crash the child with UnicodeEncodeError.
    res = subprocess.run(
        cmd, env={**os.environ, "PYTHONIOENCODING": "utf-8", "PYTHONUTF8": "1"}
    )
    if res.returncode != 0:
        raise SystemExit(f"{stage}/{script} 失败 (exit {res.returncode})")

Direct flow: pathlib.Path.read_bytes (file read) → pathlib.Path.write_bytes (file write)

High
Category
Data Flow
Confidence
80% confidence
Finding

Data flows directly from a source (env vars, files, network) to a sink (network output, exec, file write) without intermediate validation.

Content

Scanner excerpt · scripts/tts_audio.py (reported line 113)May include surrounding context.

python
# A silent block has no RMS to normalize toward; copy 16-bit WAV through verbatim
        # (or write an empty 16-bit PCM WAV) rather than dividing by a zero sample count.
        if is_pcm16:
            output_wav.write_bytes(input_wav.read_bytes())
        else:
            with wave.open(str(output_wav), "wb") as wf:
                wf.setnchannels(channels)

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

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

md
- **视频理解(`understand.py`)**:将切分后的音频窗口发往 MiMo ASR(`mimo-v2.5-asr`),将抽帧 JPEG 连同 `background_research.json` 摘要发往 MiMo VLM(默认 `mimo-v2.6-flash`,可通过 `MIMO_MODEL` 切换 `mimo-v2.6-pro` 等)。若工作目录已有完整分析产物,传 `--brief-only` 或 `--edited-storyboard-only` 则纯本地运行、不发起网络请求。
- **旁白配音(`voiceover.py`)**:按 `--tts-provider`(默认 `auto` 优先选已配置的 MiMo,其次 Fish Audio,不自动选 `index-tts`)将解说文本发往对应 TTS 服务:
  - `mimo-tts`:发往 MiMo TTS(`mimo-v2.5-tts`);若显式传了 `--voice-ref <audio>`,还会将该参考音频切片发往 `mimo-v2.5-tts-voiceclone`(使用前请确认已获声音授权)。
  - `fish-audio`:需配置 `FISH_API_KEY`,将每段解说文本与 `FISH_TTS_REFERENCE_ID` 发往 `FISH_TTS_API_URL`(默认 `https://api.fish.audio/v1/tts`)。
  - `index-tts`:仅在显式指定 `--tts-provider index-tts` 时启用,将文本与 `INDEX_TTS_VOICE` 发往用户自建的 `INDEX_TTS_ENDPOINT`(详见 `references/index-tts.md`)。
- **解说校验(`validate.py`)、视频剪辑(`cut.py`、`shot_review.py`)与音画合成(`assemble.py`)**:纯本地确定性逻辑与 `ffmpeg` / `ffprobe` 调用,不发起网络请求。

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/config-playbook.md (reported line 18)May include surrounding context.

md
`、`mimo-tts`、`fish-audio`、`index-tts`。`auto` 优先选已配置的 MiMo,其次 Fish Audio,不自动选 `index-tts` |
| MiMo 配音音色 | `MIMO_TTS_MODEL` / `MIMO_TTS_VOICE` / `--mimo-tts-voice` | `mimo-v2.5-tts` / `冰糖` | 仅 `mimo-tts` 生效 |
| 解说音色克隆 | `VOICE_REF` / `--voice-ref` | 关闭 | 仅 `mimo-tts` 支持,与 `--mimo-tts-voice` 互斥;将参考音频切片发往 `mimo-v2.5-tts-voiceclone`,使用前须获声音授权 |
| Fish Audio | `FISH_API_KEY` / `FISH_TTS_MODEL` / `FISH_TTS_REFERENCE_ID` / `FISH_TTS_API_URL` | — / `s2.1-pro-free` / `5653cea4ac83480aaf2bf45406556185` / `https://api.fish.audio/v1/tts` | 选 `fish-audio` 时需配置 `FISH_API_KEY`(默认音色“娱乐扒妹”);密钥不落盘 |
| 自建 IndexTTS | `INDEX_TTS_ENDPOINT` / `INDEX_TTS_VOICE` | — | 显式设 `TTS_PROVIDER=index-tts` 或传 `--tts-provider index-tts` 时启用;兼容 8/16/24/32-bit PCM 与 32/64-bit float WAV,固定请求体拒绝段级 `emotion`(详见 `./index-tts.md`) |
| TTS 并发与超时 | `TTS_TIMEOUT` / `TTS_WORKERS` / `TTS_RETRIES` | `300` / `4` / `3` | 单请求超时秒数、并发段数与重试次数 |
| 异常慢读检测 | `TTS_MIN_SPEECH_RATE` | `2.5` | 字/秒下限;合成音频明显超出正常朗读时长时判定为异常合成并重试,失败后留存 `*.rejected.wav`

L101 requires editing explanations in Chinese without offering a language choice.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

The instruction “用自然中文写清” explicitly requires Chinese for clip-selection reasons. No user opt-in, language selection, or operational justification is provided for imposing this language on production metadata.

Content

No source excerpt is available for this finding.

External research uses information extracted from user context and filenames without a privacy warning.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The workflow directs the agent to derive external search queries from user context and source filenames without distinguishing public titles from confidential project names, personal names, or unreleased story details. Although background research is legitimate and queries are limited to core facts, processing private video material can consequently disclose sensitive identifiers to a search provider without explicit approval.

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/assemble.py (reported line 627)May include surrounding context.

python
break
    cover_path = Path(work_dir) / "cover.jpg"
    try:
        res = subprocess.run(
            [
                "ffmpeg", "-y", "-ss", f"{seek_s:.3f}", "-i", str(final_output),
                "-frames:v", "1", "-q:v", "2", str(cover_path),

Generated clip-planning instructions require Chinese output without user opt-in.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

L362 explicitly instructs the agent to write the clip reason field in Chinese, and L504 repeats this requirement for multi-source plans. Neither instruction offers a language choice or documents a functional justification for restricting this free-text field to Chinese.

Content

No source excerpt is available for this finding.

Project library resolution contradicts the documented root-containment guarantee.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The project-controlled library value is resolved without checking containment under the dashboard root, allowing absolute paths, parent traversal, or symlinks to select an external directory. The code checks and scans that directory before calling rel_of, so even if that later function rejects the path, unauthorized filesystem scanning and availability disruption remain possible.

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/detect.py (reported line 80)May include surrounding context.

python
"rawvideo",
        "-",
    ]
    result = subprocess.run(cmd, capture_output=True)
    if result.returncode != 0 or not result.stdout:
        raise RuntimeError(result.stderr.decode("utf-8", errors="replace")[:300])
    data = result.stdout

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/export_jianying.py (reported line 49)May include surrounding context.

python
duration is worse than a failed optional export. Still images legitimately
    report no duration (0).
    """
    result = subprocess.run(
        [
            "ffprobe",
            "-v",

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/final_qc.py (reported line 111)May include surrounding context.

python
"ffprobe", "-v", "error", "-print_format", "json",
        "-show_format", "-show_streams", str(path),
    ]
    res = subprocess.run(cmd, capture_output=True, text=True)
    if res.returncode != 0:
        raise RuntimeError((res.stderr or res.stdout or "ffprobe failed").strip())
    try:

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/sentence_boundaries.py (reported line 409)May include surrounding context.

python
"null",
        "-",
    ]
    proc = subprocess.run(cmd, capture_output=True, text=True)
    if proc.returncode != 0:
        raise RuntimeError(f"ffmpeg 切镜头检测失败: {video}: {proc.stderr.strip()[-500:]}")
    changes = set()

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/final_qc.py (reported line 131)May include surrounding context.

python
if shutil.which("ffmpeg") is None:
        return None, "ffmpeg unavailable"
    try:
        res = subprocess.run(
            ["ffmpeg", "-v", "error", "-xerror", "-sseof", "-2", "-i", str(path), "-f", "null", "-"],
            capture_output=True, text=True, timeout=60,
        )

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

python
# ── 配置 ──────────────────────────────────────────────────────────────

DEFAULT_MIMO_API_URL = "https://api.xiaomimimo.com/v1"
DEFAULT_MIMO_TOKEN_PLAN_CLUSTER = "cn"
MIMO_TOKEN_PLAN_API_URLS = {
    "cn": "https://token-plan-cn.xiaomimimo.com/v1",

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

python
DEFAULT_MIMO_MODEL = "mimo-v2.6-flash"    # VLM / chat (vision understanding)
DEFAULT_MIMO_ASR_MODEL = "mimo-v2.5-asr"  # speech-to-text
DEFAULT_MIMO_TTS_MODEL = "mimo-v2.5-tts"  # text-to-speech
DEFAULT_FISH_TTS_API_URL = "https://api.fish.audio/v1/tts"
DEFAULT_FISH_TTS_MODEL = "s2.1-pro-free"
DEFAULT_FISH_TTS_REFERENCE_ID = "5653cea4ac83480aaf2bf45406556185"
TTS_PROVIDERS = ("auto", "mimo-tts", "fish-audio", "index-tts")

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/lib.py (reported line 147)May include surrounding context.

python
"""Filters the installed ffmpeg lists; empty when ffmpeg is absent."""
    binary = ffmpeg or shutil.which("ffmpeg") or "ffmpeg"
    try:
        result = subprocess.run(
            [binary, "-hide_banner", "-filters"],
            text=True,
            encoding="utf-8",

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/lib.py (reported line 454)May include surrounding context.

python
log(f"运行: {display}")
    kwargs.setdefault("encoding", "utf-8")
    kwargs.setdefault("errors", "replace")
    return subprocess.run(cmd, capture_output=True, text=True, **kwargs)


def escape_ffmpeg_filter_path(path):

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/lib.py (reported line 488)May include surrounding context.

python
graph = os.path.join(tmp, "probe_filter.txt")
        with open(graph, "w", encoding="utf-8") as fh:
            fh.write("null")
        result = subprocess.run(
            ["ffmpeg", "-hide_banner", "-/filter_complex", graph],
            stdin=subprocess.DEVNULL,
            capture_output=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/loudness.py (reported line 63)May include surrounding context.

python
"""
    if shutil.which("ffmpeg") is None:
        return False
    result = subprocess.run(["ffmpeg", "-hide_banner", "-h", "filter=alimiter"],
                            stdin=subprocess.DEVNULL, capture_output=True, text=True,
                            encoding="utf-8", errors="replace", timeout=20)
    return "latency" in result.stdout

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/packaging_fonts.py (reported line 155)May include surrounding context.

python
"hand": "sans-serif:lang=zh-cn",
            "numeric": "sans-serif:weight=bold",
        }.get(role, "sans-serif:lang=zh-cn:weight=bold")
        res = subprocess.run(
            ["fc-match", "-f", "%{file}", query],
            capture_output=True, text=True, timeout=5, check=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/recap_runtime.py (reported line 28)May include surrounding context.

python
print(f"[video-recap] ▶ {stage}/{script}", flush=True)
    # Stage scripts log Chinese; on Windows a piped stdout defaults to cp1252 and the
    # first log line would crash the child with UnicodeEncodeError.
    res = subprocess.run(
        cmd, env={**os.environ, "PYTHONIOENCODING": "utf-8", "PYTHONUTF8": "1"}
    )
    if res.returncode != 0: