Back to skill

Security audit

Huo15 Img Test

Security checks for vulnerabilities and agentic risk

Overview

This is a real image-prompt toolkit, but it needs review because it combines safety-filter rewriting, broad auto-triggers, API-key network calls, and arbitrary URL fetching without tight safeguards.

Install only if you are comfortable with a Chinese-oriented prompt toolkit that can send prompts and API keys to external services when optional features are used. Avoid using --polish or DALL-E rendering with sensitive prompts, do not set ANTHROPIC_BASE_URL to untrusted hosts, and avoid giving reverse_prompt.py arbitrary URLs unless it runs in a network-restricted environment. Review the safety rewriting behavior carefully because it may conflict with platform policies.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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/claude_polish.py:42
Finding

Anthropic API Credential Disclosure Through a Configurable Request Origin

Content
View full analysis
Dict: """Call the Anthropic Messages API with prompt caching enabled.""" api_key = os.environ.get("ANTHROPIC_API_KEY") if not api_key: raise RuntimeError( "Missing ANTHROPIC_API_KEY environment variable.\n" " • macOS/Linux: export ANTHROPIC_API_KEY=sk-ant-...\n" " • Or add it to ~/.zshrc / ~/.bashrc" ) body = { "model": model, "max_tokens": max_tokens, "temperature": temperature, "system": [ { "type": "text", "text": build_system_prompt(), "cache_control": {"type": "ephemeral"}, } ], "messages": [ { "role": "user", "content": f"{prompt}\n\nPlease output JSON.", }, { "role": "assistant", "content": "{", }, ], } req = Request( f"{ANTHROPIC_BASE}/v1/messages", data=json.dumps(body).encode("utf-8"), headers={ "Content-Type": "application/json", "x-api-key": api_key, "anthropic-version": ANTHROPIC_VERSION, }, method="POST", ) ``` ### Technical Analysis The `ANTHROPIC_BASE_URL` environment variable controls the complete destination origin, while the code unconditionally attaches the value of `ANTHROPIC_API_KEY` as an `x-api-key ...[truncated 1881 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/reverse_prompt.py:220
Finding

Server-Side Request Forgery Through Unrestricted Remote Image URLs

Content
View full analysis
bytes: if src.startswith(("http://", "https://")): req = Request(src, headers={"User-Agent": "huo15-reverse/1.0"}) with urlopen(req, timeout=15) as r: return r.read() with open(os.path.expanduser(src), "rb") as f: return f.read() ``` ### Technical Analysis The remote-image feature accepts any HTTP or HTTPS URL and passes it directly to `urlopen()`. The code does not validate: - The destination hostname or IP address. - Whether DNS resolves to a loopback, private, link-local, reserved, or metadata-service address. - The destination port. - Redirect targets. - The response content type. - Whether DNS resolution changes between validation and connection. Remote image retrieval is part of the declared functionality, but access to arbitrary internal network services is not required to parse image metadata. When this Skill is used by an Agent, API service, or automation environment, the request originates from that environment and inherits its network access. Although the script generally treats the response as an image, returned data can still affect observable output. For example, PNG metadata may be parsed and included in text or JSON results. Error and timing differences may also facilitate internal-service discovery. ### Attack Path 1. An attacker provides a crafted source URL to an Agent or service that invokes `reverse_prompt.py`. 2. The URL targets an internal resource, such as: - A loopback service. - An RFC1918 private-network host. - A link-local cloud metadata endpoint. - A public URL that redirects to one of those destinations. 3. `urlopen()` sends the request from the Skill's execution environment. 4. The attacker observes out ...[truncated 846 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/reverse_prompt.py:220
Finding

Unbounded Image Reads Permit Memory and Bandwidth Exhaustion

Content
View full analysis
bytes: if src.startswith(("http://", "https://")): req = Request(src, headers={"User-Agent": "huo15-reverse/1.0"}) with urlopen(req, timeout=15) as r: return r.read() with open(os.path.expanduser(src), "rb") as f: return f.read() ``` ### Technical Analysis Both remote responses and local files are read completely into memory without a maximum byte limit. The 15-second network timeout limits elapsed socket operations but does not impose a response-size limit. A sufficiently fast server can therefore deliver a very large response within the timeout. The response is retained as a single `bytes` object and subsequently processed by the PNG parser. This can create substantial memory pressure and bandwidth consumption. Local paths supplied to the script can cause the same problem when they reference very large files. ### Attack Path 1. An attacker supplies a URL that returns a very large body while maintaining sufficient transfer speed. 2. `urlopen()` accepts the response. 3. `r.read()` attempts to allocate memory for the complete body. 4. The Skill process consumes excessive memory and network bandwidth. 5. The process may be terminated, become unresponsive, or degrade other workloads on the host. For local exploitation, an attacker who can influence the `source` argument can point it to an unusually large readable file and trigger the same unbounded allocation. ### Impact Assessment The primary impact is denial of service against the Skill process or its host through: - Excessive memory consumption. - Excessive network bandwidth use. - Process termination by the operating system. - Reduced availability of co-located Agent workloads. This issue does not provide direct code execu ...[truncated 55 chars]
Remediation
View remediation
MAX_IMAGE_BYTES: raise ValueError("Remote image exceeds the size limit") ``` 3. Do not rely only on `Content-Length`. Read in bounded chunks and abort when the accumulated size exceeds the limit: ```python chunks = [] total = 0 while True: chunk = r.read(64 * 1024) if not chunk: break total += len(chunk) if total > MAX_IMAGE_BYTES: raise ValueError("Remote image exceeds the size limit") chunks.append(chunk) blob = b"".join(chunks) ``` 4. Check local file size with `os.stat()` before reading, while retaining a bounded read as a defense against file changes. 5. Validate supported image signatures early and reject non-image data. 6. Apply network, memory, and execution-time limits at the process or container level as defense in depth. ]]>
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
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (29)

Tainted flow: 'req' from os.environ.get (line 149, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
94% confidence
Finding

The request destination is derived from ANTHROPIC_BASE_URL, an environment variable, and then used in urlopen with the Anthropic API key in headers. If an attacker can influence the environment, they can redirect requests to an attacker-controlled host and exfiltrate the API key and all prompt content; because this skill sends user prompts and a powerful system prompt, the exposure includes both credentials and potentially sensitive user data.

Content

Scanner excerpt · scripts/claude_polish.py (reported line 161)May include surrounding context.

python
)

    try:
        with urlopen(req, timeout=120) as r:
            return json.loads(r.read().decode("utf-8"))
    except HTTPError as e:
        err_body = e.read().decode("utf-8", errors="replace")

Ssd 2

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The changelog explicitly frames the feature as avoiding platform misclassification by rewriting risky terms, which can preserve disallowed intent while making content more likely to pass downstream safety filters. In this skill context, that materially increases the risk of moderation evasion for prohibited image/video generation requests.

Content

No source excerpt is available for this finding.

Ssd 2

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The listed yellow-zone substitutions provide concrete euphemistic rewrites for violence, nudity, horror, death, real-person, brand, and weapon-related terms. Publishing a substitution dictionary for sensitive categories operationalizes moderation bypass by teaching users and downstream tools how to retain unsafe semantics in sanitized form.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description presents a broad multi-script package with six major capabilities, including video prompting, reverse prompting from reference images, direct rendering to image backends, Claude polishing, and safety linting. However, the supplied code chunk is exclusively for enhance_prompt.py and its behavior aligns with only the first listed capability: enhancing text-to-image prompts with presets, mixing, consistency locks, series mode, character sheets, quality tiers, and model-specific formatting. While the code references optional claude_polish and safety_lint modules, those implementations are not present in this chunk and cannot substantiate the full declared suite. Therefore, the declared description materially overstates what this supplied code chunk actually does.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger phrases include extremely generic terms such as '提示词', '生成图片', 'text to image', and model/vendor names, which can cause accidental activation during ordinary user conversations. In an agent setting, broad triggers increase the risk that the skill is invoked unexpectedly and gains access to files, environment variables, or networked backends without clear user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The alias list contains highly ambiguous names like '文生图', '文生视频', '智能润色', and 'img-test', which are common phrases rather than unique identifiers. This makes inadvertent routing likely and expands the blast radius of any privileged behavior embedded in the skill.

Content

No source excerpt is available for this finding.

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · scripts/claude_polish.py (reported line 14)May include surrounding context.

python
调用:
  claude_polish.py "一个温柔的女孩在花丛中"
  claude_polish.py "赛博朋克猫" --model claude-sonnet-4-5
  claude_polish.py "敦煌神女" --include-safety   # 同时跑 safety_lint
  claude_polish.py "汉服少女" -j > polished.json
  claude_polish.py "雪山下的小屋" --pipe         # 输出可直接喂给 enhance_prompt.py 的 CLI

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · scripts/claude_polish.py (reported line 319)May include surrounding context.

python
epilog="""
示例:
  claude_polish.py "一个温柔的女孩在花丛中"
  claude_polish.py "赛博朋克猫" --model claude-sonnet-4-6
  claude_polish.py "敦煌神女" -j > polished.json
  claude_polish.py "雪山下的小屋" --pipe   # 输出可直接喂给 enhance_prompt.py 的命令

Ssd 2

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The tool is explicitly designed to rewrite prompts so they are less likely to be flagged by model safety systems, described as improving the chance of passing review. Even with some hard blocks, this creates a moderation-evasion capability that can help users transform disallowed or borderline content into policy-friendlier wording for image/video generation systems.

Content

No source excerpt is available for this finding.

Ssd 2

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The substitution table systematically replaces sensitive terms—violence, nudity, death, horror, celebrity/real-person references, and weapon models—with euphemisms or artistic aliases likely to preserve user intent while reducing detection by keyword-based moderation. This is dangerous because it operationalizes policy circumvention at scale and can be used to generate transformed prompts for content a platform may otherwise block.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The changelog explicitly states the skill was given a Chinese alias and that this alias was added as the first item in the aliases list. Because the file does not indicate that users can choose their preferred language or locale, this creates a natural-language locale policy concern under the rule for forced language without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The documentation introduces direct Claude API use with an API key and prompt transmission but does not clearly warn users that their prompts may be sent to a third-party remote service. In a prompt-processing skill, this can expose sensitive user content, proprietary prompts, or internal data to an external provider without informed consent.

Content

No source excerpt is available for this finding.

Ssd 4

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The described two-step workflow—first using an LLM to enrich content, then rewriting flagged terms—systematizes gradual safety-filter evasion and makes bypass easier for end users. Combining refinement with sanitization can increase the fidelity and success rate of prohibited requests while reducing obvious policy-triggering keywords.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The changelog describes sending prompts and possibly workflows/images to external or local HTTP backends for rendering, but it does not warn about network transfer, backend side effects, or resource consumption. Users may unknowingly trigger data disclosure to external services or expensive/unsafe local operations through ComfyUI, SD-WebUI, or DALL-E integrations.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises capabilities that require environment access, file reads, and network use, but it does not declare any tool scope or permission boundaries. That creates an implicit-privilege situation where an agent may invoke the skill with broader access than intended, increasing the chance of secret leakage, local file exposure, or unintended outbound requests.

Content

No source excerpt is available for this finding.

Indirect Prompt Extraction

Medium
Category
System Prompt Leakage
Confidence
85% confidence
Finding

The skill explicitly supports 'reverse prompt' and metadata-based extraction from reference images, which can be used to recover hidden prompts, workflow metadata, or creator information from user-supplied assets. In creative tooling this can be legitimate, but it also enables indirect extraction of embedded instructions or sensitive provenance data that users may not realize is present.

Content

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

md
---
name: huo15-img-test
displayName: 火一五文生图提示词
description: 火一五文生图提示词 v2.3 — 文生图&视频六件套:(1) enhance_prompt.py 文生图:88 风格预设 + 混合预设 (-p A+B --mix 0.6) + 五锁一致性 + 角色设定图 + 系列批量 + basic/pro/master 三档;(2) enhance_video.py 视频提示词:9 模型规格(Sora/Kling/Runway/Pika/Luma/Hailuo/即梦/Wan)+ 30 镜头运动 + 关键帧三段式;(3) reverse_prompt.py 参考图反解:A1111/ComfyUI/NovelAI metadata 自动识别 + VLM fallback;(4) render_prompt.py 直出图片:ComfyUI/SD-WebUI/DALL-E 三后端;(5) claude_polish.py ⭐v2.3 Claude API 智能润色:把粗糙描述转专业摄影/绘画术语 + 推荐预设/相机/光影;(6) safety_lint.py ⭐v2.3 平台合规润色:识别会被 SD/MJ/DALL-E 误判的艺术词汇并给出合法艺术化替代(仅服务合规艺术创作,拒绝违法/未成年/真人色情)。适配 Midjourney/SD/SDXL/Flux/DALL-E 3。触发词:文生图、火一五文生图提示词、文生视频、提示词、生成图片、生成视频、img-test、text to image、text to video、enhance prompt、提示词增强、图片一致性、系列图、角色一致、批量出图、混合风格、原神+敦煌、参考图反解、reverse prompt、提示词反解、ComfyUI 直出、SD WebUI、DALL-E、视频提示词、Sora、可灵、Runway、即梦、Hailuo、Claude 润色、智能润色、平台合规、艺术化重写。
version: 2.3.0
aliases:
  - 火一五文生图提示词

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The activation example explicitly says the agent should auto-trigger on a commonplace term like '赛博朋克', which normal users may mention descriptively without intending to run a skill. This normalizes implicit execution and weakens user-consent boundaries around tool invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

Line L170 instructs users to use English for subject, style, and regional/cultural terms as a blanket rule. This is a language-policy constraint presented as normative guidance, and the document does not offer users a choice of language or explain a justified region-specific requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file description states the tool turns rough Chinese descriptions into polished prompts and specifies '中文输入 → 中英混合输出', which imposes a language/locale behavior rather than offering a user choice. This is reinforced as a natural-language expectation for the skill rather than a clearly justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The embedded natural-language system prompt instructs the model to refine Chinese descriptions and produce fields such as a more detailed Chinese subject plus an English version, making the language policy fixed by design. There is no indication that users can opt into another language or locale behavior.

Content

No source excerpt is available for this finding.

Ssd 1

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The system prompt explicitly tells the model '不要拒答' and to reframe borderline terms instead of refusing, which weakens normal safety behavior and can facilitate transformation of risky sexual/violent content into policy-evasive wording. In a prompt-polishing skill, that increases the chance the tool helps users bypass downstream model or platform safeguards rather than enforcing them.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This Python file's user-facing description, CLI help, examples, and output strings are written exclusively in Chinese, and the feature list explicitly promotes Chinese/English mixed input rather than offering a language choice. That creates a natural-language locale constraint without documenting opt-in or presenting an alternative language mode.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest for this file positionally describes enhance_prompt.py as a prompt enhancement tool with presets, consistency locks, batching, and style mixing. In this file, the --polish path imports another module and calls call_claude(), which sends user content to an external API and depends on ANTHROPIC_API_KEY, adding a networked LLM-processing capability beyond straightforward local prompt construction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file’s docstring, examples, and user-facing descriptions are entirely in Chinese, and the generated CLI output is also Chinese-oriented. Under the policy rule for natural-language violations, this is a locale/language constraint that does not provide user opt-in or an explicit justification that the tool is 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/render_prompt.py (reported line 98)May include surrounding context.

python
"response_format": "b64_json",
    }
    resp = http_post_json(
        "https://api.openai.com/v1/images/generations",
        body,
        headers={"Authorization": f"Bearer {api_key}"},
        timeout=300,