Back to skill

Security audit

Huo15 Comic Bgm

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its BGM purpose, but it sends prompts and credentials to a third-party API, downloads an unvalidated returned URL, and bundles broader undeclared media helpers.

Review before installing. Use it only for scripts you are comfortable sending as prompt-derived mood data to api.sunoapi.org, provide a dedicated SUNO_API_KEY, and run it in a constrained project directory. The publisher should document third-party transmission, validate generated download URLs, enforce timeouts and size limits, and remove or disclose the unused Ark image/video/TTS helpers.

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

Warning
Location
scripts/bgm.py:68
Finding

Unvalidated API-provided audio URL enables server-side request forgery and unbounded downloads

Content
View full analysis
int: p = argparse.ArgumentParser() p.add_argument("--script", required=True) p.add_argument("--duration", type=int, required=True) p.add_argument("--out", required=True) args = p.parse_args() out = pathlib.Path(args.out) if out.exists(): print(f" ⏭️ {out.name} 已存在") return 0 script = json.loads(pathlib.Path(args.script).read_text()) moods = top_moods(script) prompt = build_prompt(moods, args.duration) print(f"🎵 BGM prompt: {prompt}") project_dir = out.parent guard = CostGuard.load(project_dir) try: url = suno_generate(prompt, args.duration) r = requests.get(url, stream=True) out.parent.mkdir(parents=True, exist_ok=True) with open(out, "wb") as f: for chunk in r.iter_content(8192): f.write(chunk) ``` ### Technical Analysis The audio URL is obtained from the response of the third-party Suno-compatible API and passed directly to `requests.get()` without validation. The implementation does not restrict the URL scheme or destination host, reject embedded credentials, verify the resolved IP address, or constrain redirects. Consequently, a compromised, malicious, or incorrectly configured upstream service could return a URL targeting: - Loopback services such as `127.0.0.1` - Private network ranges - Link-local or cloud metadata services - Unexpected external tracking endpoints - Redirectors that event ...[truncated 1555 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/_shared/ark_api.py:169
Finding

Generic video downloader permits caller-controlled SSRF and unrestricted file downloads

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 `download_video()` accepts an arbitrary URL and immediately performs a server-side request. There is no validation of the scheme, destination hostname, resolved IP address, port, or redirect chain. Any caller able to influence `url` can make the Skill host request internal, loopback, link-local, or otherwise sensitive HTTP endpoints. Although a timeout is present, it is a single 300-second timeout and does not impose a response-size limit. The method also fails to call `raise_for_status()` or confirm that the response contains video media. Error pages, internal-service responses, and oversized bodies can therefore be written to `out_path`. This helper is not imported or invoked by the reviewed BGM entry point, which reduces immediate exposure. However, it is bundled executable functionality and may be reused by other entry points or callers. ### Attack Path 1. A caller or upstream workflow supplies a crafted URL to `ArkClient.download_video()`. 2. The crafted URL targets an internal endpoint directly or redirects to one. 3. The function sends the request from the Skill host without applying a destination policy. 4. The endpoint's response is streamed to the specified output path. 5. The attacker may use the request to probe internal services or cause resource exhaustion through a large response. ### Impact Assessment ...[truncated 491 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 (21)

Tainted flow: 'headers' from os.environ.get (line 52, 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/bgm.py (reported line 59)May include surrounding context.

python
"instrumental": True,
        "model": MODELS["music"],  # suno-v5.5
    }
    r = requests.post(f"{SUNO_API}/v1/generate", headers=headers, json=body, timeout=60)
    r.raise_for_status()
    task_id = r.json().get("id") or r.json().get("task_id")

Tainted flow: 'headers' from os.environ.get (line 52, 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/bgm.py (reported line 66)May include surrounding context.

python
deadline = time.time() + 600
    while time.time() < deadline:
        time.sleep(10)
        g = requests.get(f"{SUNO_API}/v1/tasks/{task_id}", headers=headers, timeout=30)
        d = g.json()
        status = d.get("status")
        if status in ("succeeded", "complete"):

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个面向剧本情绪分析并生成背景音乐的技能,但提供的代码片段只是共享库的 init.py 注释,内容集中在模块路径回退、sys.path 注入、共享依赖导入和发布流程复制,并没有实现或体现生成 BGM、分析 mood、匹配时长、国风乐器偏好、或调用 Suno v5 的行为。因此代码实际用途与声明的核心功能明显不一致,属于实质性 mismatch。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是“BGM 生成”技能,且明确指向 Suno v5 的背景音乐/配乐生成,重点是根据剧本 mood 生成音乐并匹配时长。实际代码并未实现任何音乐/BGM 生成逻辑,也未调用 Suno 或其他音乐生成接口。相反,代码主要封装了火山方舟的图像生成、视频生成、视频下载/轮询,以及 TTS 语音合成功能。这些能力与声明的主用途明显不一致,且包含多项未声明的多模态生成能力。因此属于明显的描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是一个 BGM 生成技能,核心能力应是根据剧本 mood 和时长生成背景音乐;但实际代码完全没有任何音乐生成、Suno v5 调用、剧本分析、时长匹配或国风风格控制逻辑。相反,这段代码是通用的 checkpoint 持久化工具,用于记录项目各处理阶段状态并支持恢复运行。其主要目的与声明明显不一致,且包含未声明的文件读写与流程管理能力。因此应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是一个专门的 BGM 生成功能,聚焦 Suno 音乐生成、时长匹配和国风配乐偏好。但实际代码只是一个共享配置文件,服务于整套脚本/图像/视频/TTS/口型/音乐流水线,并未看到任何依据剧本 mood 生成 BGM 的实现。更重要的是,代码暴露了大量与声明无关的能力和资源,包括图像与视频模型、TTS、Kling 口型同步、视频价格计算、视觉风格与音色预设等。这些都超出了“仅生成背景音乐”的已声明范围,因此属于明显的描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的核心能力是‘生成 BGM’,尤其强调基于剧本 mood、时长匹配、国风乐器偏好以及 Suno v5 生成。但提供的代码完全没有任何音乐生成、Suno 调用、音频处理、mood 分析、时长匹配或乐器风格控制逻辑。相反,它是一个通用的成本守卫/预算管理组件,负责估算与记录多媒体生产流程成本,并在超预算时告警或中断。这不是对 BGM 生成功能的支撑性细节,而是一个不同的、独立的基础设施能力。因此描述与实际行为存在明显且实质性的功能不匹配。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill advertises code-like capabilities involving environment access, file I/O, and network use, but does not declare any explicit tool scope or permissions. In an agent ecosystem, this creates an overbroad and opaque execution surface, making it harder to enforce least privilege and increasing the chance of unintended data access or outbound requests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This file contains user/developer-facing natural language exclusively in Chinese, including the top-level module description and operational comments. Under the stated policy, forcing a specific language without user opt-in is a language/locale policy violation unless the constraint is documented and justified.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest says this skill generates background music matching a script's mood, but this shared module implements image generation, video generation, video downloading, and TTS synthesis in addition to audio-related functionality. Those capabilities are not justified by a BGM-generation skill description and materially expand what the skill can do.

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,

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
87% confidence
Finding

The skill sends prompt text and potentially user-supplied image, video, or audio references to the Volcengine Ark service via HTTP requests. Although this is functionally expected for the API client, there is no confirmation prompt, logging, or explicit user-facing warning in this file about external transmission of potentially sensitive content.

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,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This method transmits input text to an external service and persists the generated audio file locally. The code lacks any confirmation prompt, logging, or explicit warning that text leaves the local environment and that an output file will be created.

Content

No source excerpt is available for this finding.

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
85% confidence
Finding

The natural-language content in the module is entirely Chinese, and the TTS voice preset IDs are explicitly limited to zh_* voices, which indicates the skill is configured around a single language/locale. The file does not present this as an opt-in choice or document that the skill is intentionally region- or language-specific, which matches the policy's language/locale violation criterion.

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
93% confidence
Finding

This code file contains all user-facing natural-language strings and documentation in Chinese, including warnings and exception messages, with no indication that the user can choose another language. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The skill sends generated prompt content and metadata to a third-party Suno API, which is an external data transmission. In this skill context, moods are derived from the user-provided script, so sensitive story content or proprietary creative details may be disclosed to an external provider without minimization or explicit consent controls.

Content

Scanner excerpt · scripts/bgm.py (reported line 59)May include surrounding context.

python
"instrumental": True,
        "model": MODELS["music"],  # suno-v5.5
    }
    r = requests.post(f"{SUNO_API}/v1/generate", headers=headers, json=body, timeout=60)
    r.raise_for_status()
    task_id = r.json().get("id") or r.json().get("task_id")

Tainted flow: 'task_id' from requests.post (line 61, network input) → requests.get (network output)

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

python
deadline = time.time() + 600
    while time.time() < deadline:
        time.sleep(10)
        g = requests.get(f"{SUNO_API}/v1/tasks/{task_id}", headers=headers, timeout=30)
        d = g.json()
        status = d.get("status")
        if status in ("succeeded", "complete"):