Back to skill

Security audit

Local Video Ad Pipeline v0.5

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches a local video-generation pipeline, but it needs Review because it can run unpinned external Python code, send project prompts or media to configurable services, and perform disruptive local actions without enough scoping.

Install only after reviewing the scripts and using trusted local endpoints. Keep --comfy and --ace on loopback or a trusted HTTPS service, avoid the Qwen GUI fallback unless the module path is known and controlled, review project JSON before composition, expect Korean and adult-glamour defaults unless overridden, and require explicit confirmation before WSL shutdown or Telegram upload.

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

Warning
Location
scripts/generate_keyframes_direct.py:38
Finding

Configurable ComfyUI Endpoint Can Disclose Project Prompts to an Arbitrary Host

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/generate_character_anchor.py:74
Finding

Configurable External Python Modules Are Imported and Executed Without Integrity Verification

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/compose.py:95
Finding

Unvalidated Subtitle IDs Permit Path Traversal and FFconcat Directive Injection

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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (31)

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill prescribes a specific ethnicity and national aesthetic ('adult Korean female protagonist' with 'Korean Instagram-model' styling) as the default when the user has not specified appearance. In a public creative tool, this is a biased and non-consensual default that can override user intent, narrow representation, and systematically inject demographic targeting into generated media without opt-in.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill describes broad capabilities including shell execution, file read/write, and network use, but declares no explicit tool scope or permissions boundary. In an agent setting, this increases the chance the skill is run with overly broad authority, enabling unintended command execution, local file modification, or network exfiltration beyond the user's expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description states that the pipeline produces a Korean subtitle script as part of its default behavior. This is a language-specific constraint presented without user opt-in or explanation that the skill is intended only for Korean-language use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill instructs wsl --shutdown, which forcibly stops all WSL instances and can interrupt unrelated workloads, background services, or unsaved work on the host. Without a clear warning or confirmation step, an agent could execute a disruptive system-wide action that exceeds the user's likely expectation for a video pipeline.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instruction to send output via the Telegram Bot API introduces an external data-transfer path that is not essential to the local generation pipeline and can move user-created media off the local system. That creates avoidable privacy and data-handling risk, especially if the content is sensitive or users assume the workflow remains entirely local.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Recommending Telegram Bot API delivery without a privacy warning can cause users to unknowingly transmit generated videos to a third-party platform. Even if the token is not pasted into logs, the omission of consent and privacy guidance makes accidental external disclosure more likely.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The guidance hard-codes a sexualized default protagonist specification, including body and attractiveness traits unrelated to character-consistency mechanics. In a general-purpose public video-generation skill, this can steer outputs toward objectifying or unsafe content without explicit user request, increasing the chance of policy-violating or inappropriate generated media.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file embeds sexually explicit or strongly sexualized characterization defaults, but the skill metadata and surrounding documentation do not warn users that such defaults may be inserted into prompts. This creates a transparency and consent problem: users may unknowingly generate sexualized ad content, which is especially risky in a public pipeline and can lead to unsafe outputs if age is ambiguous.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The documentation instructs operators to save raw prompts and model responses to project files without warning about retention, sensitivity, or consent. In practice, prompts and responses can contain proprietary campaign ideas, personal data, or unsafe content, so silent persistence expands the risk of data leakage, unintended reuse, and compliance violations on shared local systems.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill embeds sexualized default casting and body-emphasizing prompt guidance as a normative default for ad generation, even when the user has not requested sexual content. This can steer outputs toward objectifying or sexually suggestive material, increasing safety, policy, and brand-risk exposure, and it becomes more concerning because the same section also discusses age-related exceptions, showing the author anticipated boundary issues rather than avoiding them by default.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The example subtitle script is explicitly in Korean, and elsewhere the document repeatedly centers a Korean creative default, but there is no opt-in or statement that the skill is region-specific. This creates a natural-language locale policy concern because the file effectively steers output to a specific language without user choice.

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

python
def probe_duration(path):
    out = subprocess.check_output([
        "ffprobe", "-v", "quiet", "-print_format", "json", "-show_streams", str(path)
    ], text=True)
    v = next(s for s in json.loads(out)["streams"] if s["codec_type"] == "video")

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
87% confidence
Finding

The ffmpeg command embeds user-influenced subtitle text and font path into a filtergraph string. Although subprocess is not using a shell, ffmpeg's filter syntax has its own escaping rules; insufficient escaping can let crafted input break filter parsing, reference unintended files, or alter processing behavior, especially via drawtext=textfile= and an attacker-controlled --font value.

Content

Scanner excerpt · scripts/compose.py (reported line 153)May include surrounding context.

python
"-pix_fmt", "yuv420p", "-an", str(dst),
        ]
        print(f"  {sid}: {printed} + sub")
        r = subprocess.run(cmd, capture_output=True, text=True)
        if r.returncode != 0:
            print(r.stderr[-1000:])
            sys.exit(1)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
81% confidence
Finding

The script generates an ffmpeg concat list from untrusted shot IDs and then runs ffmpeg with -safe 0, which disables path safety checks. If an attacker can control subtitle JSON keys or temp directory contents, they may inject arbitrary file entries into the concat manifest and cause unintended local file reads or processing of attacker-chosen files by ffmpeg.

Content

Scanner excerpt · scripts/compose.py (reported line 168)May include surrounding context.

python
), encoding="utf-8")
    silent_out.parent.mkdir(parents=True, exist_ok=True)
    cmd = ["ffmpeg", "-y", "-f", "concat", "-safe", "0", "-i", str(listfile), "-c", "copy", str(silent_out)]
    r = subprocess.run(cmd, capture_output=True, text=True)
    if r.returncode != 0:
        print(r.stderr[-1000:])
        sys.exit(1)

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

python
"-filter_complex", af, "-map", "0:v", "-map", "[a]",
        "-c:v", "copy", "-c:a", "aac", "-b:a", "192k", "-shortest", str(final),
    ]
    r = subprocess.run(cmd, capture_output=True, text=True)
    if r.returncode != 0:
        print(r.stderr[-1000:])
        sys.exit(1)

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

python
sys.exit(2)
        if actual_total > args.target_duration + 0.05:
            trimmed = silent.with_name(silent.stem + "_trimmed.mp4")
            r = subprocess.run([
                "ffmpeg", "-y", "-i", str(silent), "-t", f"{args.target_duration:.3f}",
                "-c", "copy", "-an", str(trimmed)
            ], 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/contact_sheet.py (reported line 9)May include surrounding context.

python
def probe_size(video):
    out = subprocess.check_output([
        "ffprobe", "-v", "quiet", "-print_format", "json", "-show_streams", str(video)
    ], text=True)
    stream = next(s for s in json.loads(out)["streams"] if s["codec_type"] == "video")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script passes -y to ffmpeg, which forces overwriting the output file without prompting the user. If a user supplies an existing path, important local files could be unintentionally destroyed or replaced, especially in an automation pipeline where paths may be generated or reused.

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

python
"-vf", vf,
        "-frames:v", "1", "-update", "1", args.out,
    ]
    subprocess.run(cmd, check=True)
    print(Path(args.out).resolve())

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

python
wf = build_wf(d, in_name, prompt, seed, prefix)
        body = json.dumps({"prompt": wf}).encode()
        try:
            res = json.loads(urllib.request.urlopen(
                urllib.request.Request(f"{d['comfy']}/prompt", data=body,
                                       headers={"Content-Type": "application/json"}),
                timeout=60).read())

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
94% confidence
Finding

The script prepends a user-controlled directory to sys.path and then dynamically imports a user-controlled module name via import(). This creates a straightforward arbitrary code execution path because importing a Python module executes its top-level code, so any attacker who can influence --qwen-gui-dir or --module can run code in the context of the script.

Content

Scanner excerpt · scripts/generate_character_anchor.py (reported line 81)May include surrounding context.

python
args = ap.parse_args()

    sys.path.insert(0, args.qwen_gui_dir)
    qwen = __import__(args.module)  # type: ignore

    qwen.COMFYUI_URL = args.comfy
    qwen.OUTPUT_DIR = args.output_dir

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

The script prepends a user-controlled directory to sys.path and then dynamically imports a user-controlled module name via import(). This can execute arbitrary Python code at import time if an attacker can influence --qwen-gui-dir or --module, making it a direct code-execution risk rather than a mere flexibility feature.

Content

Scanner excerpt · scripts/generate_keyframes_from_anchor.py (reported line 122)May include surrounding context.

python
wanted = set(args.shots or [])

    sys.path.insert(0, args.qwen_gui_dir)
    qwen = __import__(args.module)  # type: ignore

    qwen.COMFYUI_URL = args.comfy
    qwen.OUTPUT_DIR = args.output_dir

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script posts the generated workflow to a local HTTP endpoint and then polls history, which transmits user-provided shot instructions and reference-derived workflow data to another service. While this may be part of the implementation, the file provides no explicit runtime warning or confirmation that project content will be sent to the ComfyUI/Qwen service.

Content

No source excerpt is available for this finding.

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
93% confidence
Finding

The script prepends a user-controllable directory to sys.path and then dynamically imports a user-controllable module name via import. If an attacker can influence --qwen-gui-dir or --module, they can cause arbitrary Python code to execute at import time, which is a direct code-execution risk on the host running the skill.

Content

Scanner excerpt · scripts/generate_keyframes_t2i.py (reported line 146)May include surrounding context.

python
wanted = set(args.shots or [])

    sys.path.insert(0, args.qwen_gui_dir)
    qwen = __import__(args.module)  # type: ignore
    qwen.COMFYUI_URL = args.comfy
    qwen.OUTPUT_DIR = args.output_dir
    qwen.PROMPT_PREFIX = ""

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

python
def run(cmd):
    result = subprocess.run(cmd, text=True)
    if result.returncode != 0:
        raise SystemExit(result.returncode)