Back to skill

Security audit

Anime Drama

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent RunningHub video-generation pipeline, but it has a serious scripting flaw that could let crafted story text run commands on the user's machine and may expose the RunningHub API key.

Review or patch this skill before installing. Do not run it on untrusted story text unless shell=True command construction is removed, avoid sensitive unpublished drafts unless you accept RunningHub processing, and protect or rotate RUNNINGHUB_API_KEY if the script has already been run with logs captured.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/anime_drama_pipeline.py:44
Finding

Shell Command Injection Through Story Content, Configuration, and File Paths

Content
View full analysis
Remediation
View remediation
0 and args[i - 1] == "--api-key" else value for i, value in enumerate(args) ] print(f"[CMD] {redacted}", file=sys.stderr) return subprocess.run( args, shell=False, capture_output=True, text=True, timeout=timeout, check=False, ) ``` 2. Construct RunningHub invocations without shell interpolation: ```python cmd = [ "python3", os.path.expanduser(RH_SCRIPT_APP), "--run", IMG_APP_ID, "--node", f"12:value={enhanced_prompt}", "-o", str(output_path), "--api-key", API_KEY, ] result = run(cmd, timeout=300, check=False) ``` 3. Invoke FFmpeg using an argument list: ```python cmd = [ "ffmpeg", "-y", "-f", "concat", "-safe", "0", "-i", str(list_file), "-c:v", "libx264", "-pix_fmt", "yuv420p", "-vf", "scale=1080:1920:force_original_aspect_ratio=decrease," "pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black", str(output_path), ] ``` 4. Validate application IDs against the exact format accepted by RunningHub. 5. Resolve and validate output paths before use. If output must remain under an approved directory, enforce this after canonicalization. 6. Treat external helper output as untrusted. Validate returned paths and confirm that they identify expected regular files. 7. Add regression tests containing spaces, quotes, semicolons, backticks, and command-substitution syntax to verify that these values are passed only as literal arguments. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/anime_drama_pipeline.py:44
Finding

RunningHub API Key Exposed in Logs and Process Arguments

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
references/ffmpeg-install.md:8
Finding

Unpinned and Unverified Third-Party Dependency Installation

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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The documented behavior does not fully match the real operational behavior: the workflow uploads generated images to an external RunningHub service and claims capabilities such as automatic storyboard generation that are not actually implemented. This is dangerous because users may provide sensitive story content under false assumptions about local-only processing and feature coverage, undermining informed consent and safe handling of data.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This is the strongest signal in the file: a generic command runner executes shell strings with shell=True, and the pipeline feeds it commands containing untrusted prompt text, output paths, script paths, app IDs, and API secrets. Because the skill processes user-supplied story text and then embeds it into command-line arguments, the application context materially increases the likelihood and severity of command injection.

Content

Scanner excerpt · scripts/anime_drama_pipeline.py (reported line 43)May include surrounding context.

python
def run(cmd, timeout=300, check=True):
    """执行shell命令"""
    print(f"[CMD] {cmd}", file=sys.stderr)
    result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout)
    if result.returncode != 0 and check:
        print(f"[ERROR] stdout: {result.stdout}", file=sys.stderr)
        print(f"[ERROR] stderr: {result.stderr}", file=sys.stderr)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill describes shell execution, file reads/writes, and use of environment secrets, but it does not declare any explicit tool scope or permissions boundaries. This makes the runtime trust model ambiguous and can lead to overbroad execution privileges, especially because the pipeline invokes python3, curl, and ffmpeg and processes user-supplied files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description fails to warn that user story text and derived media are sent to an external service. In this context, users may input unpublished creative works or sensitive text, so nondisclosure creates a meaningful privacy and data-governance risk even if the external service is legitimate.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The markdown provides concrete command examples that send an API key to an external third-party service and embed it directly in CLI arguments or form fields, but it does not warn about credential exposure, shell history leakage, logging, or the privacy implications of uploading user-provided media. In the context of an automation skill that chains external AI services, this increases the chance that operators will copy insecure usage patterns and expose secrets or sensitive content during normal use.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module docstring states the pipeline is '小说原文 → 分镜脚本 → 文生图 → 图生视频 → 配音合成 → 最终成片', which explicitly includes voice synthesis. In the implementation, the flow only parses text, generates images, generates videos, and concatenates them with ffmpeg; there is no audio, TTS, dubbing, or soundtrack handling anywhere in the file.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

The helper uses subprocess.run(..., shell=True) on a fully formatted command string. Multiple call sites interpolate environment-derived values, file paths, and story-derived prompts into that string, so shell metacharacters in those inputs can trigger command injection and arbitrary command execution.

Content

Scanner excerpt · scripts/anime_drama_pipeline.py (reported line 43)May include surrounding context.

python
def run(cmd, timeout=300, check=True):
    """执行shell命令"""
    print(f"[CMD] {cmd}", file=sys.stderr)
    result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout)
    if result.returncode != 0 and check:
        print(f"[ERROR] stdout: {result.stdout}", file=sys.stderr)
        print(f"[ERROR] stderr: {result.stderr}", file=sys.stderr)

Tainted flow: 'cmd' from os.environ.get (line 129, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
95% confidence
Finding

Environment-controlled values such as API_KEY, IMG_APP_ID, VID_APP_ID, and the RH script path are concatenated into shell command strings that are executed with shell=True. An attacker who can influence environment variables or upstream prompt/file content can inject additional shell syntax and execute arbitrary commands under the user's account.

Content

Scanner excerpt · scripts/anime_drama_pipeline.py (reported line 43)May include surrounding context.

python
def run(cmd, timeout=300, check=True):
    """执行shell命令"""
    print(f"[CMD] {cmd}", file=sys.stderr)
    result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout)
    if result.returncode != 0 and check:
        print(f"[ERROR] stdout: {result.stdout}", file=sys.stderr)
        print(f"[ERROR] stderr: {result.stderr}", file=sys.stderr)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The pipeline uploads generated assets derived from user-provided story content to a third-party RunningHub service without an explicit warning or consent gate. In this skill context, users may provide unpublished or sensitive text, making silent external transmission a real privacy and data-handling risk.

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

python
"-F", "fileType=input",
        "-F", f"file=@{file_path}",
    ]
    result = subprocess.run(cmd, capture_output=True, text=True)
    if result.returncode != 0:
        print(f"[ERROR] 上传失败: {result.stderr}", file=sys.stderr)
        return None

Tainted flow: 'cmd' from os.environ.get (line 129, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/anime_drama_pipeline.py (reported line 72)May include surrounding context.

python
"-F", "fileType=input",
        "-F", f"file=@{file_path}",
    ]
    result = subprocess.run(cmd, capture_output=True, text=True)
    if result.returncode != 0:
        print(f"[ERROR] 上传失败: {result.stderr}", file=sys.stderr)
        return None

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

SQP-3 applies to all file types and includes language or locale policy violations. The entire skill document is written only in Chinese, with no indication that the skill is region-specific or that users may opt into another language, which can conflict with an organizational policy requiring language choice or neutrality.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This is a markdown file, so SQP-2 applies to missing user warnings in documentation. The instructions recommend downloading a binary from the internet and moving it into /usr/local/bin, which affects system integrity and typically requires elevated privileges, but the text does not warn the user about the need for sudo/root access or the impact of modifying a system-wide executable path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

A language or locale policy violation can occur when a skill forces a specific language without user opt-in. This file presents all user-facing instructions in Chinese and does not indicate that the skill is region-specific or offer an alternative language.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file includes concrete commands that write to /tmp/video_list.txt and invokes ffmpeg with the -y flag, which forces overwrite of output files. The surrounding instructions do not warn the user that existing files may be replaced during manual merge.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

Natural-language instructions, status text, and usage guidance are presented in Chinese only, which effectively forces a specific language on the user. The file does not indicate that this locale restriction is optional, user-selected, or justified as region-specific.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The function docstring says '将小说原文解析为分镜列表', and the manifest/overall description frames this as automated storyboard/script generation. However, the function merely splits the input on non-empty lines and copies each paragraph verbatim into description, image_prompt, and video_prompt, which does not match the stronger claim of generating a storyboard script.

Content

No source excerpt is available for this finding.