Back to skill

Security audit

Huo15 Comic Script

Security checks for vulnerabilities and agentic risk

Overview

The skill's main script-generation flow is understandable, but the package also includes under-disclosed media-generation code that can send prompts or local media to external APIs.

Review before installing. It is reasonable if you want a Chinese comic storyboard generator and are comfortable with an Anthropic-backed CLI fallback, but the package also contains unused or under-disclosed media-production helpers that can call third-party services, use API keys, upload local reference images, and write cost/checkpoint files. Consider removing or disabling the shared media modules unless you intend to use that broader pipeline.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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)

T07 · Tool Hijacking and Spoofing

Warning
Location
scripts/script_gen.py:14
Finding

External Module Search Path Allows Local Configuration Hijacking

Content
View full analysis

Vulnerability Details

File Location: scripts/script_gen.py, lines 14–21
Vulnerability Type: Untrusted Python module search path
Risk Level: Medium

python
HERE = pathlib.Path(__file__).resolve()
# _shared/ 定位:优先 bundled(scripts/_shared/),fallback monorepo 根
for _cand in (HERE.parent / "_shared", HERE.parents[2] / "_shared"):
    if (_cand / "config.py").exists():
        sys.path.insert(0, str(_cand))
        break

from config import DEFAULTS, STYLE_PRESETS, GENRE_PRESETS

Technical Analysis

The script first searches for the bundled scripts/_shared/config.py, but if that file is absent, it searches an _shared directory outside the Skill package and prepends the selected directory to sys.path. It then imports config by its unqualified module name.

Python executes top-level module code during import. Consequently, an attacker who can place a malicious config.py in the fallback directory can cause arbitrary Python code to run when script_gen.py starts. The existence check verifies only the filename and does not validate ownership, permissions, expected content, or whether the resolved file remains within the trusted Skill root.

The bundled module normally takes precedence, which limits exploitation to installations where the bundled file is missing, removed, or incompletely packaged. Nevertheless, falling back to a location outside the package violates the trust boundary and permits local tool/module spoofing.

Attack Path

  1. The Skill is installed or copied without scripts/_shared/config.py, or that bundled file is removed.
  2. An attacker with write access to the fallback location creates _shared/config.py at the path represented by HERE.parents[2] / "_shared".
  3. The malicious file defines the expected names so execution can continue, while placing an arbitrary payload in its top-level code.
  4. A user or Agent invokes python scripts/script_gen.py ....
  5. The fallback directory is inserted at the beginning ...[truncated 806 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the external fallback and fail closed if the bundled configuration is unavailable.
  2. Package _shared as a proper Python package and use an explicit package-relative import rather than modifying sys.path.
  3. If development-mode fallback support is essential, require an explicit opt-in setting and resolve the candidate path before use.
  4. Verify that any fallback path is within a predefined trusted repository root and reject symlinks or path traversal outside that root.
  5. Check ownership and permissions so untrusted users cannot modify the fallback module.
  6. Add packaging and startup tests that confirm the bundled configuration is present and that execution fails safely when it is absent.

A preferred structure is:

python
try:
    from scripts._shared.config import DEFAULTS, STYLE_PRESETS, GENRE_PRESETS
except ImportError as exc:
    raise RuntimeError("Bundled Skill configuration is unavailable") from exc
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (24)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Budget tracking and cost-state persistence are legitimate support functions, but when undocumented they indicate the skill is managing a larger paid media pipeline than advertised. This mismatch can hide spend-triggering operations and create trust and governance issues, especially in agent environments where users expect a local JSON generation task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Budget tracking and cost-state persistence are legitimate support functions, but when undocumented they indicate the skill is managing a larger paid media pipeline than advertised. This mismatch can hide spend-triggering operations and create trust and governance issues, especially in agent environments where users expect a local JSON generation task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Budget tracking and cost-state persistence are legitimate support functions, but when undocumented they indicate the skill is managing a larger paid media pipeline than advertised. This mismatch can hide spend-triggering operations and create trust and governance issues, especially in agent environments where users expect a local JSON generation task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Budget tracking and cost-state persistence are legitimate support functions, but when undocumented they indicate the skill is managing a larger paid media pipeline than advertised. This mismatch can hide spend-triggering operations and create trust and governance issues, especially in agent environments where users expect a local JSON generation task.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill metadata declares no explicit tool restrictions even though the available context indicates capabilities such as environment access, file read/write, and network use. In an agent setting, missing scope declarations can let a seemingly simple script-generation skill invoke far more powerful operations than users expect, increasing the blast radius of prompt injection or misuse.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Broad trigger phrases increase the chance that the skill activates in contexts where the user did not clearly intend to invoke it. In an environment where the skill may have file, network, or other hidden capabilities, overbroad activation becomes more dangerous because accidental invocation can launch unexpected workflows.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes a skill that turns a one-line theme into a storyboard/script JSON with fields like characters, scenes, dialogue, camera, and mood. This module instead implements external image generation, video generation, video downloading, and text-to-speech synthesis, which are distinct media-production capabilities not justified by a script-only skill purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The image-generation path sends the user's prompt and any referenced local images to an external Volcengine endpoint, including automatic conversion of local files into data URIs for upload. Although the module docstring identifies the API family, there is no user-facing warning, prompt, or explicit disclosure in these execution paths that local content will be transmitted off-host.

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

This function accepts prompt text plus optional image, video, and audio references and sends them to a remote generation API. The code contains no confirmation, print/log statement, or warning near the operation to disclose that potentially sensitive user media and text are being transmitted externally.

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

The TTS function transmits input text to a remote service and persists the generated audio to a local output file. Although the docstring discusses API compatibility, it does not clearly warn that user text leaves the system and that audio is written to disk.

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

This code file contains natural-language docstrings and comments exclusively in Chinese, which effectively imposes a specific language on maintainers or users reading the skill assets. The policy allows fixed locale only when opt-in is offered or the constraint is clearly documented and justified, which is not present here.

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

The module docstrings and user-facing exception/help text are written entirely in Chinese, including operational warnings and downgrade guidance. This imposes a language choice on users without offering an opt-in or alternative locale, which matches the policy-violation criterion for forced language or locale.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The module docstring states that standalone CLI mode requires ANTHROPIC_API_KEY, and the implementation later instantiates the Anthropic client to generate content remotely. For a skill whose stated purpose is simply producing script.json from a theme, credentialed third-party API access is an additional capability not justified or declared in the manifest.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The system prompt mandates Chinese output and a specific Chinese aesthetic and terminology (for example, '你是国风漫剧编剧' and use of Chinese cinematic terms) without offering any user language or locale choice. This is a natural-language policy issue because it imposes a specific language/locale behavior rather than making it optional or clearly documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest describes a skill that turns a one-line theme into a storyboard JSON output, which reads like a content-generation skill producing script.json. This file also implements a separate mode that sends the user prompt to Anthropic over the network via the SDK, an external-service dependency not reflected in the manifest description.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The file's human-readable documentation and inline explanatory text are presented exclusively in Chinese. Under the stated policy, forcing a specific language without offering a language choice or documenting the locale constraint is a natural-language policy issue.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The download helper writes remote video content directly to a caller-supplied local path after creating parent directories. While the behavior is straightforward, this is a file-write operation with no confirmation or visible disclosure in the code path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
73% confidence
Finding

The only natural-language description in the file is written in Chinese and does not offer a language choice or explain a justified locale restriction. Under SQP-3, forcing a specific language without user opt-in can violate language or locale policy expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This code persists status data by creating the project directory and writing .checkpoint.json, but the file contains no confirmation prompt, user-facing log message, or explanatory comment/docstring warning that project files will be created or modified. For a code-file review under SQP-2, file writes that affect the user's workspace should include some visible disclosure unless clearly documented elsewhere.

Content

No source excerpt is available for this finding.