Back to skill

Security audit

Whiteboard Video Workflow

Security checks for vulnerabilities and agentic risk

Overview

The skill broadly matches a whiteboard-video workflow, but it changes the local Python environment and sends subtitle-derived prompts to RunningHub while downloading returned URLs without enough safeguards.

Install only if you are comfortable with local Python dependency changes, use of a separate whiteboard-animation skill, storing a RunningHub API key in the skill directory, and sending subtitle-derived prompts to RunningHub. Avoid confidential subtitles unless approved, and run it with restricted filesystem, network, and disk quotas where possible.

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/generate-image.py:177
Finding

Unrestricted Download from a Server-Supplied URL Enables SSRF and Resource Exhaustion

Content
View full analysis
= 300 and resp.status < 400: location = resp.headers.get('Location') if location: return download_file(location, dest_path) if resp.status != 200: raise RuntimeError(f'Download failed with status {resp.status}') with open(dest_path, 'wb') as f: shutil.copyfileobj(resp, f) return dest_path ``` ```python async def _download(): print(f'{tag}Downloading image to {filepath}...') await asyncio.to_thread(download_file, result['url'], filepath) print(f'{tag}Image saved: {filepath}') return filepath return await with_retry(_download, max_retries=MAX_RETRIES, context=tag) ``` ### Technical Analysis The image URL received from the RunningHub API is passed directly to `urllib.request.urlopen()` without validating its scheme, hostname, resolved IP address, port, or final redirect destination. The implementation does not: - Require HTTPS for downloaded images. - Restrict downloads to approved RunningHub or CDN domains. - Reject loopback, link-local, private, multicast, or reserved IP addresses. - Revalidate DNS resolution immediately before connecting. - Validate every redirect destination. - Set a download timeout. - Limit the maximum number of downloaded bytes. - Verify that the response ...[truncated 2662 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (27)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是核心业务工作流(从字幕生成白板动画视频),而提供的代码片段并未实现这些生成流程中的任何阶段,只负责运行前环境检测与可选依赖安装。虽然环境检查可以是该工作流的辅助组成部分,但该代码片段本身的主要功能与声明的主要用途明显不同。此外,代码访问本地 .env、检查 RUNNINGHUB_API_KEY,并通过 subprocess 调用另一个脚本安装/检查依赖,这些能力在声明中没有体现。基于该片段单独评估,描述与实际行为存在明显不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是一个完整的三阶段白板动画视频生成工作流,但提供的代码块只对应其中的“图片生成”部分。代码从命令行接收 prompt 或 prompt 列表,而不是 SRT 文件;它将 prompt 拼接白板模板后发送到 runninghub.cn 的文生图接口,轮询 taskId 状态,成功后下载静态图片到本地。没有任何字幕解析、时间轴处理、镜头拆分、视频合成、音视频编码等逻辑。因此该代码的实际主功能与声明的整体技能目的存在明显且实质性的不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个完整的白板视频生成工作流,包含至少三个阶段:分镜解析、图片生成、视频生成。但提供的代码块只是一个单独脚本,用于解析 SRT、读取并验证外部 AI 已生成的 groups.json,然后输出 storyboard.json。它没有调用任何图像生成模型、视频渲染工具、媒体处理库或下游流水线,也没有产出白板动画视频文件。因此其实际行为仅覆盖“分镜数据整理/生成”的一部分,和声明的端到端视频生成能力存在明显不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

声明描述的是完整的“从字幕到白板动画视频”的端到端工作流,但该代码块只是工作流辅助工具。它能做的事情包括:初始化 storyboard/image/video 目录;读取 storyboard.json 中的 scenes/segments/visualHint 并拼接成文本提示词;将外部已生成的视频片段重新编码后合并为一个 mp4。代码中完全没有 SRT 解析逻辑,也没有分镜解析实现、图片生成调用、视频生成调用或完整流程编排。因此其实际行为仅覆盖了声明工作流中的少数辅助环节,且关键主功能缺失,属于明显的描述与行为不匹配。

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

python
SKILLS_ROOT = SKILL_DIR.parent

ANIMATION_SKILL = SKILLS_ROOT / "whiteboard-animation"
IMAGE_GEN_SKILL = SKILL_DIR  # .env 已迁入本 skill 根目录


def check_python_venv(check_only):

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

python
SKILLS_ROOT = SKILL_DIR.parent

ANIMATION_SKILL = SKILLS_ROOT / "whiteboard-animation"
IMAGE_GEN_SKILL = SKILL_DIR  # .env 已迁入本 skill 根目录


def check_python_venv(check_only):

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/generate-image.py (reported line 34)May include surrounding context.

python
SKILLS_ROOT = SKILL_DIR.parent

ANIMATION_SKILL = SKILLS_ROOT / "whiteboard-animation"
IMAGE_GEN_SKILL = SKILL_DIR  # .env 已迁入本 skill 根目录


def check_python_venv(check_only):

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/generate-image.py (reported line 84)May include surrounding context.

python
SKILLS_ROOT = SKILL_DIR.parent

ANIMATION_SKILL = SKILLS_ROOT / "whiteboard-animation"
IMAGE_GEN_SKILL = SKILL_DIR  # .env 已迁入本 skill 根目录


def check_python_venv(check_only):

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

python
def check_api_key():
    """检查 RUNNINGHUB_API_KEY"""
    env_file = SKILL_DIR / ".env"
    if not env_file.exists():
        return {"ok": False, "error": f".env 文件不存在: {env_file},请创建并设置 RUNNINGHUB_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 · scripts/generate-image.py (reported line 38)May include surrounding context.

python
def load_env():
    if os.environ.get('RUNNINGHUB_API_KEY'):
        return
    env_path = SCRIPT_DIR.parent / '.env'
    if env_path.exists():
        for line in env_path.read_text(encoding='utf-8').splitlines():
            trimmed = line.strip()

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
97% confidence
Finding

The skill directs the agent to use shell execution, local file reads/writes, environment-variable access, and external networked services, yet the manifest declares no explicit tool scope or permission boundaries. That creates an overbroad-execution risk: an orchestrator or reviewer cannot easily distinguish the minimum required capabilities from anything else the skill may attempt, reducing containment if the skill is invoked on sensitive systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that environment checking may automatically install dependencies, but it does not prominently warn the user up front that invoking the workflow can modify the local Python environment or install software. Silent or poorly disclosed environment mutation is dangerous because it can change system state, introduce supply-chain risk, and violate user expectations on controlled hosts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The workflow sends generated prompts and likely user-derived content to an external image-generation service via RunningHub, but the description does not clearly warn users that their subtitle-derived content leaves the local environment. This creates data exposure and privacy risk, especially if subtitles contain proprietary, personal, or regulated information.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to send user-provided prompts to a third-party image-generation service using an API key, but it does not disclose that prompts and generated outputs will be transmitted off-box and stored locally. In this workflow, prompts may be derived from SRT subtitle content, which can contain sensitive or proprietary information, so the lack of a warning or consent step creates a real privacy and data-handling risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The natural-language instructions and examples are presented entirely in Chinese, which can constitute a language policy issue if the skill assumes that locale by default. There is no indication that the user may choose another language or that the Chinese-only scope is intentional and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module docstring, usage instructions, and runtime status messages are written entirely in Chinese, which imposes a specific language on users without any opt-in or alternative locale. The policy explicitly flags language or locale constraints when the skill does not offer user choice or document a justified region-specific reason.

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

python
return {"ok": False, "error": f"setup_env.py 不存在: {setup_script}"}

    # 先检查
    result = subprocess.run(
        [sys.executable, str(setup_script), "--check"],
        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/check_env.py (reported line 55)May include surrounding context.

python
# 检查失败,如果不是 check-only 则尝试安装
    if not check_only:
        print("[..] Python 依赖缺失,正在安装...")
        result = subprocess.run(
            [sys.executable, str(setup_script)],
            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/check_env.py (reported line 61)May include surrounding context.

python
)
        if result.returncode == 0:
            # 安装成功,再次检查
            result2 = subprocess.run(
                [sys.executable, str(setup_script), "--check"],
                capture_output=True, text=True,
            )

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script sends prompts derived from user-provided subtitle content to a third-party API endpoint. In this workflow, subtitles may contain sensitive or proprietary text, and there is no explicit disclosure, consent gate, or data-minimization step before transmission, creating a privacy and data-handling risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code forces Chinese punctuation in generated scene text and also emits Chinese-language prompt content and error messages elsewhere in the script. That constitutes a language/locale policy issue because users are not given an opt-in or alternative language path, and the locale restriction is not justified in the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The activation description uses only Chinese trigger phrases, which can impose a language-specific invocation policy without any opt-in or explanation that the skill is intended only for Chinese-speaking users. Under the stated policy, language constraints should either be optional or clearly justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown skill explicitly directs the agent to save generated files under {projectRoot}, which modifies the user's filesystem. Although file creation is part of the skill's purpose, the description does not include any warning or disclosure that groups.json and storyboard.json will be written to disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill instructs execution of a local Python script against paths influenced by user-provided inputs without any explicit trust boundary, safety warning, or validation guidance. In an agent setting, normalizing silent local code execution can increase the risk of unsafe execution flows, especially if projectRoot or skill-dir resolution is compromised elsewhere or if users do not realize code will run on their machine.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

L302 明确写着“最终 storyboard.json(由 JS 脚本生成)”,但前文实际执行命令是 python3 <skill-dir>/scripts/generate-storyboard.py(L177-L181),且步骤 5 也说明运行的是 Python 脚本(L173-L191)。这是文档说明与实际执行方式的直接矛盾,容易误导维护者或调用方对实现与运行环境的理解。

Content

No source excerpt is available for this finding.