Back to skill

Security audit

Huo15 Comic Lipsync

Security checks for vulnerabilities and agentic risk

Overview

This lip-sync skill does what it advertises, but it uploads local media to paid external APIs and has weak cost and download controls that users should review before installing.

Review this before installing if your media is confidential or your Kling account has meaningful billing exposure. Use only non-sensitive input directories, set tight external account limits outside the skill, and be aware that the built-in cost tracking should not be treated as a hard spending cap.

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

Error
Location
scripts/lipsync.py:90
Finding

Cost-limit exception is swallowed after paid API submission, allowing spending beyond the configured cap

Content
View full analysis
None: """扣费,触发软预警/硬熔断.""" self.spent += cost self.records.append(CostRecord(step=step, item=item, cost=cost)) ratio = self.spent / self.cap if self.cap else 0 if ratio >= 1.0: self._persist() raise BudgetExceeded( f"累计成本 ¥{self.spent:.2f} 达到熔断上限 ¥{self.cap:.2f}({step}/{item})。\n" f"已完成步骤可从 checkpoint 续跑。" ) ``` ### Technical Analysis The paid Kling request is submitted and completed before `CostGuard.charge()` checks whether the configured cost cap has been reached. The main loop does not reserve or validate the expected cost before invoking the external API, and it never calls the available `CostGuard.preflight()` method. When `charge()` detects that the cap has been reached, it raises `BudgetExceeded`. However, `lipsync.py` catches every exception through `except Exception`. The budget exception is therefore treated as an ordinary lip-sync failure. The script copies the original video, records a fallback checkpoint, and continues processing subsequent scenes. Every later scene can submit another paid request before the sa ...[truncated 1348 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/lipsync.py:93
Finding

Service-provided download URLs are fetched without destination validation or resource limits

Content
View full analysis
pathlib.Path: out_path = pathlib.Path(out_path) out_path.parent.mkdir(parents=True, exist_ok=True) r = requests.get(url, stream=True, timeout=300) with open(out_path, "wb") as f: for chunk in r.iter_content(8192): f.write(chunk) return out_path ``` ### Technical Analysis The code treats URLs returned by external services as trusted and passes them directly to `requests.get()`. It does not: - Require HTTPS. - Restrict downloads to approved service or CDN hostnames. - Reject loopback, link-local, private, or internal network destinations. - Restrict redirects to approved destinations. - Call `raise_for_status()` before writing the response. - Validate that the response content type represents a video. - Enforce a maximum response size. - Remove partial output files after failures. The active lip-sync download also lacks explicit connection and read timeouts. A slow or non-terminating response can therefore hold the process indefinitely. Ordinarily, the URL originates from Kling, which reduces direct attacker control. Exploitation requires a compromised upstream service, a malicious or malformed API response, or another mechanism capable of influencing the returned URL. Under those conditions, the client can be induced to make requests from its own network context. ### Attack Path 1. The scri ...[truncated 1346 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (27)

Tainted flow: 'headers' from os.environ.get (line 46, credential/environment) → requests.post (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/lipsync.py (reported line 39)May include surrounding context.

python
"audio": open(audio_path, "rb"),
    }
    data = {"model": MODELS["lipsync"]}  # kling-v2.6
    r = requests.post(f"{KLING_API}/videos/lip-sync", headers=headers, files=files, data=data)
    r.raise_for_status()
    return r.json()["task_id"]

Tainted flow: 'headers' from os.environ.get (line 46, credential/environment) → requests.get (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/lipsync.py (reported line 50)May include surrounding context.

python
deadline = time.time() + timeout_s
    while time.time() < deadline:
        time.sleep(8)
        r = requests.get(f"{KLING_API}/videos/lip-sync/{task_id}", headers=headers)
        data = r.json()
        if data.get("status") == "succeeded":
            return data["video_url"]

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Budget guards and cost persistence are not inherently malicious, but if they are undeclared they still represent hidden file writes and broader workflow management beyond the stated lip-sync purpose. Hidden persistence such as .cost.json can surprise users, leak project metadata, and complicate data handling expectations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Budget guards and cost persistence are not inherently malicious, but if they are undeclared they still represent hidden file writes and broader workflow management beyond the stated lip-sync purpose. Hidden persistence such as .cost.json can surprise users, leak project metadata, and complicate data handling expectations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Budget guards and cost persistence are not inherently malicious, but if they are undeclared they still represent hidden file writes and broader workflow management beyond the stated lip-sync purpose. Hidden persistence such as .cost.json can surprise users, leak project metadata, and complicate data handling expectations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Budget guards and cost persistence are not inherently malicious, but if they are undeclared they still represent hidden file writes and broader workflow management beyond the stated lip-sync purpose. Hidden persistence such as .cost.json can surprise users, leak project metadata, and complicate data handling expectations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Budget guards and cost persistence are not inherently malicious, but if they are undeclared they still represent hidden file writes and broader workflow management beyond the stated lip-sync purpose. Hidden persistence such as .cost.json can surprise users, leak project metadata, and complicate data handling expectations.

Content

No source excerpt is available for this finding.

Tainted flow: 'files' from open (line 34, file read) → requests.post (network output)

High
Category
Data Flow
Confidence
86% confidence
Finding

The script uploads local video and audio files to an external cloud API, which is a real data-transmission risk if those media contain sensitive content or were not meant to leave the local environment. In this skill context, external upload is the core feature, so the issue is not hidden malware, but it still creates privacy and data-governance exposure because raw media is sent off-box without any consent check or minimization in this file.

Content

Scanner excerpt · scripts/lipsync.py (reported line 39)May include surrounding context.

python
"audio": open(audio_path, "rb"),
    }
    data = {"model": MODELS["lipsync"]}  # kling-v2.6
    r = requests.post(f"{KLING_API}/videos/lip-sync", headers=headers, files=files, data=data)
    r.raise_for_status()
    return r.json()["task_id"]

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill advertises network, environment, and filesystem-capable behavior but does not declare any tool scope or permission boundaries. In an agent setting, this increases the chance of over-broad execution, unexpected secret access, and unintended file/network operations beyond what a user would reasonably infer from the manifest.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
82% confidence
Finding

The skill explicitly sends video and audio references to an external API, which is a real data egress event. In the context of media processing this may be expected, but it still carries privacy, confidentiality, compliance, and cost risk if user content or signed URLs are transmitted without clear disclosure and consent.

Content

Scanner excerpt · SKILL.md (reported line 28)May include surrounding context.

API

text
POST https://api.kling.com/v1/videos/lip-sync
Headers: Authorization: Bearer {KLING_API_KEY}
Body:
{

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a skill for lip-syncing video shots with dialogue audio, but this shared client also exposes full image generation functionality. Generating images is not an obvious requirement for performing lip sync on existing video and audio inputs, so this capability is unjustified by the stated purpose of the skill.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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/_shared/ark_api.py (reported line 66)May include surrounding context.

python
"size": size,
            "watermark": False,
        }
        resp = requests.post(
            f"{self.base_url}/images/generations",
            headers=self.headers,
            json=body,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This module sends prompt text and potentially local image, audio, or video-derived data to external Ark API endpoints via HTTP requests. While the code functionality is clear, there is no confirmation prompt, logging, or explicit user-facing warning in the relevant methods that user content will be transmitted off-system.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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/_shared/ark_api.py (reported line 144)May include surrounding context.

python
if seed is not None:
            body["seed"] = seed

        resp = requests.post(
            f"{self.base_url}/contents/generations/tasks",
            headers=self.headers,
            json=body,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The video submission path packages prompt text plus optional first/last frames, reference images, audio, and video into a request sent to a remote API. The method lacks any user-facing warning or disclosure that local or user-provided media may be transmitted externally.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest says the skill synchronizes provided video shots with provided dialogue audio, and specifically skips shots without dialogue. A TTS feature creates new speech audio from text, which changes the skill from lip-syncing supplied audio into synthesizing audio content, a separate capability not stated in the manifest.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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/_shared/ark_api.py (reported line 207)May include surrounding context.

python
if emotion:
            body["emotion"] = emotion

        resp = requests.post(
            f"{self.base_url}/audio/speech",
            headers=self.headers,
            json=body,

Tainted flow: 'resp' from requests.get (line 158, network input) → pathlib.Path.write_bytes (file write)

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/_shared/ark_api.py (reported line 216)May include surrounding context.

python
resp.raise_for_status()
        out = pathlib.Path(out_path)
        out.parent.mkdir(parents=True, exist_ok=True)
        out.write_bytes(resp.content)
        return out

    # ------------ 工具 ------------

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file’s docstrings, comments, style presets, genre presets, and TTS voice IDs are all Chinese-specific, and there is no natural-language indication that users may opt into another language or locale. Under the policy, forcing a specific language/locale without user choice is a reportable natural-language policy concern unless the constraint is explicitly documented and justified as region-specific.

Content

No source excerpt is available for this finding.

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/_shared/config.py (reported line 35)May include surrounding context.

python
# API 端点(2026-04 核对)
ENDPOINTS = {
    "ark_base":      "https://ark.cn-beijing.volces.com/api/v3",
    "kling_base":    "https://api.klingai.com/v1",         # 官方;第三方 piapi.ai/fal.ai 亦可
    "suno_base":     "https://api.sunoapi.org",             # 第三方(Suno 无公开官方 API)
}

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file contains natural-language documentation and runtime messages entirely in Chinese, including exception and warning text shown to users. Under the policy, forcing a specific language without opt-in or documented locale justification is a language/locale policy violation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
78% confidence
Finding

The skill is designed to transmit media to an external service endpoint, which is a genuine external-transmission security concern because it moves potentially sensitive user content outside the local trust boundary. In this context the transmission is intentional and central to the feature, so the danger is mainly privacy/compliance and third-party trust risk rather than covert exfiltration.

Content

Scanner excerpt · scripts/lipsync.py (reported line 26)May include surrounding context.

python
from checkpoint import Checkpoint


KLING_API = ENDPOINTS["kling_base"]  # https://api.klingai.com/v1


def submit_lipsync(video_path: pathlib.Path, audio_path: pathlib.Path) -> str:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This file performs external upload of both video and dialogue audio to a third-party API but contains no explicit disclosure, warning, or policy check before transmission. In a media-processing skill, that makes the issue more credible because users may assume local processing unless told otherwise, creating privacy, confidentiality, and compliance risk rather than classic code-execution risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The natural-language metadata and heading are entirely in Chinese, and the skill does not indicate that users can choose another language or that the locale restriction is intentional. Under the policy, forcing a specific language without user opt-in can be a locale-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The natural-language documentation in this file is written only in Chinese, and the default TTS voice is also Chinese-specific. This can indicate an implicit language constraint without offering user choice or documenting that the skill is intentionally region/language-specific.

Content

No source excerpt is available for this finding.