Back to skill

Security audit

Hd Infoimage

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly does the advertised infographic generation, but it also tells agents to expose a local API key and send generated outputs through an unspecified Feishu script.

Review before installing. This skill should not be allowed to print local API keys or automatically send generated images to Feishu. Only use it with non-sensitive content, require explicit approval before any external delivery, and remove or rewrite the credential-reading and Feishu-sending instructions before trusting it in an agent workflow.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • 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)

T01 · Skill Instruction Hijacking

Warning
Location
references/style-01-坐标蓝图·波普实验室.md:22
Finding
Mandatory Third-Party Branding Injected into Generated Images<![CDATA[ ## Vulnerability Details **File Location**: `references/style-01-坐标蓝图·波普实验室.md`, line 22 **Vulnerability Type**: Output manipulation through embedded skill instructions **Risk Level**: Medium ### Vulnerable Code Snippet ```text 每个模块需包含具体品牌名、数值、百分比及视觉符号建议(如:180°C、X轴、45度切角)最右下角小字展示“模板by WaytoAGI”。 ``` The final clause directs the agent to display “Template by WaytoAGI” in small text at the bottom-right of the generated image. ### Technical Analysis The style reference contains a mandatory attribution unrelated to the declared core function of generating high-density infographics. Because reference files are incorporated into image-generation prompts, this instruction can alter the final user-visible output whenever style 1 is selected. The branding requirement is not disclosed in the primary skill description or presented as an optional setting. It therefore functions as instruction-level output hijacking: ordinary user content is transformed into promotional material for a third party without explicit user consent. ### Attack Path 1. A user requests an infographic and selects style 1, or the agent recommends style 1 under the default-style behavior. 2. The agent loads `references/style-01-坐标蓝图·波普实验室.md`. 3. The complete style instructions are combined with the user’s article and sent to the image-generation model. 4. The model follows the embedded bottom-right branding directive. 5. The user receives or publishes an image containing undisclosed third-party attribution. ### Impact Assessment The issue does not grant operating-system privileges or direct access to user accounts. Its scope is the integrity of generated content. Potential effects include: - Undisclosed third-party promotion in user-owned output. - Reputational or contractual harm if the image is published commercially. - Misrepresentation of the image’s creator or template source. - Reduced user control over generated artifacts. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the mandatory “Template by WaytoAGI” instruction from the style prompt. 2. If attribution is legitimately required, disclose it prominently in `README.md` and `SKILL.md`. 3. Require explicit user opt-in before adding any watermark, attribution, logo, promotional text, or platform branding. 4. Add a neutral configuration option such as `include_attribution: false`, defaulting to disabled. 5. Review all reference prompts for other fixed branding or content that is not directly requested by the user. 6. Add a pre-generation validation step that rejects undeclared promotional or attribution directives. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
README.md:49
Finding
API Key Extracted from OpenClaw Configuration and Printed to Standard Output<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, line 49 **Vulnerability Type**: Sensitive credential exposure **Risk Level**: High ### Vulnerable Code Snippet ```bash cat ~/.openclaw/openclaw.json | python3 -c "import json,sys; d=json.load(sys.stdin); print(d['models']['providers']['ZenMux']['apiKey'])" ``` ### Technical Analysis The documented command reads the OpenClaw configuration file, extracts the ZenMux API key, and prints the plaintext secret to standard output. Printing a credential is unsafe because standard output may be retained in: - Terminal scrollback and shell-session recordings. - Agent tool-call results and conversation history. - CI/CD logs or remote execution logs. - Debugging and observability systems. - Screen recordings, screenshots, or copied command output. Although the key is not hardcoded in the repository, the documented extraction process converts a protected configuration value into broadly observable plaintext. If the command is executed through an agent tool, the secret may also be included in model-visible context. ### Attack Path 1. A user or agent follows the API-key retrieval instructions in `README.md`. 2. The command reads `~/.openclaw/openclaw.json`. 3. The Python expression extracts `models.providers.ZenMux.apiKey`. 4. `print(...)` writes the full API key to standard output. 5. The plaintext value is captured in terminal history, tool output, logs, or conversation context. 6. A party with access to any captured output obtains the key. 7. The exposed key may be reused to make unauthorized ZenMux API requests until it is revoked or rotated. ### Impact Assessment The command does not directly grant broader host privileges. However, disclosure of the API key may grant the privileges assigned to that ZenMux credential, potentially including: - Unauthorized image-generation or other provider API calls. - Consumption of the account’s quota or paid balance. - Access to provider features authorized ...[truncated 253 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the command that prints the API key. 2. Use a credential provider or secret manager that passes the key directly to the image-generation process without exposing its value. 3. Modify the generation script to retrieve the credential securely from the protected configuration at runtime. 4. If an environment variable is required, populate it through a secure launcher rather than command substitution visible in logs. 5. Ensure generated commands, exceptions, and debugging output redact API keys. 6. Apply restrictive permissions to the configuration file, such as owner-only read and write access. 7. Restrict the ZenMux key by service, operation, quota, and source environment where supported. 8. Rotate the key if the documented command has already been executed in a logged or model-visible environment. 9. Add automated secret-exposure tests that detect commands which print configuration fields named `apiKey`, `token`, `secret`, or similar. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:47
Finding
Generated Content Is Directed to an Unreviewed External Feishu Delivery Script<![CDATA[ ## Vulnerability Details **File Locations**: `SKILL.md`, line 47; `README.md`, line 48 **Vulnerability Type**: Unscoped external transmission through an undeclared dependency **Risk Level**: High ### Vulnerable Code Snippets From `SKILL.md`: ```text - 生成后用 `send_to_feishu.sh` 发送(见 sketch-illustration skill) ``` From `README.md`: ```text - 生成后用 `send_to_feishu.sh` 发送(见 sketch-illustration skill) ``` These instructions direct the agent to send generated output using `send_to_feishu.sh` from a separate `sketch-illustration` skill. ### Technical Analysis The declared purpose of the audited skill is infographic generation. The post-generation instruction expands that scope by directing the agent to invoke a delivery script from another skill and transmit the result to Feishu. The referenced script is not included in this project, so its implementation, destination selection, authentication behavior, and data handling cannot be reviewed from the audited artifact. The instructions also do not specify: - The Feishu tenant, chat, user, or channel receiving the data. - Whether the user has approved the destination. - Which article content, prompts, metadata, or generated files are transmitted. - Whether the external script accesses additional credentials. - Whether transmission is logged, encrypted, or subject to retention controls. This creates a least-privilege and authorization-boundary problem. A local content-generation task can trigger an external action with effects beyond the reviewed package. The audit did not find the referenced script itself, so actual exfiltration or malicious behavior by that script cannot be confirmed; the vulnerability is the unconditional, unscoped delegation to unreviewed code. ### Attack Path 1. A user supplies an article or other potentially sensitive content for infographic generation. 2. The skill processes the content and creates an image. 3. The agent follows the post-generation instruction in `SKILL.md` or ...[truncated 1157 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove automatic or unconditional Feishu delivery from the core generation workflow. 2. Require explicit user confirmation immediately before every external transmission. 3. Display the exact destination, file list, and data categories that will be sent. 4. Treat delivery as a separate optional capability rather than part of infographic generation. 5. Bundle the sending implementation for review or pin it to a verified, versioned dependency with integrity validation. 6. Enforce destination allowlists and prevent scripts from selecting arbitrary webhooks, chats, or recipients. 7. Grant the sending integration only the minimum Feishu permissions required. 8. Do not transmit the source article, model prompt, API key, local path details, or unrelated metadata unless separately authorized. 9. Log delivery outcomes without recording credentials or sensitive content. 10. Refuse to invoke the external script when its implementation, destination, or authorization status cannot be verified. ]]>
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (21)

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger condition is broad enough to match common requests about articles, notes, visualizations, or knowledge graphics, which can cause the skill to activate unexpectedly. Overbroad activation increases the chance that operators or agents will run embedded operational steps, including image generation and related side effects, in situations where the user did not explicitly request this specific workflow.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The document includes operational instructions to execute image-generation commands, access credentials, and send outputs externally, but provides no user-consent, data-handling, or secret-safety warnings. In context, this is dangerous because the skill processes user-supplied article content and may transmit it to third-party services or messaging endpoints without making those side effects explicit.

Context-Inappropriate Capability

Medium
Confidence
98% confidence
Finding
The README explicitly instructs operators to read a provider API key from a local configuration file using a shell pipeline. That expands the skill’s capabilities from image generation into credential access, which is unnecessary for the stated user-facing purpose and creates a concrete risk of secret exposure, reuse in other contexts, or normalization of secret-handling by untrusted skill content.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger description is broad enough that the skill could activate for many content-creation requests without a clear boundary on when it should be used. Over-broad invocation can cause unintended processing of user content and can chain into the documented outbound-sharing behavior, making accidental data exposure more likely.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The usage example tells the operator to combine the user’s article with a prompt and generate an unspecified number of images, but it does not define scope, limits, or privacy expectations. Ambiguous invocation patterns increase the chance of over-processing or invoking the skill in contexts the user did not clearly intend.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The skill’s documented behavior expands from image generation into outbound delivery via `send_to_feishu.sh`, which is a separate data-transmission capability. That creates an unexpected exfiltration path for user-provided content and generated outputs, especially since the manifest does not declare or justify external sharing.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
Sending outputs through Feishu is not necessary for the stated purpose of generating high-density images and therefore violates least functionality. Unnecessary external delivery increases privacy and data-handling risk because generated images may embed sensitive user content from the source article.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The instruction to send generated images via a shell script introduces data transmission to a third-party channel without any user-facing disclosure or confirmation. Because the generated image is derived from user-supplied article content, this can leak sensitive or proprietary information outside the expected execution environment.

Context-Inappropriate Capability

Medium
Confidence
87% confidence
Finding
The manifest describes a skill for generating high-density visual images from user-provided article/content. In this file, the documented workflow adds capabilities to search Xiaohongshu high-performing posts and call a knowledge base, which goes beyond straightforward content-to-image generation and is not declared in the skill description.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The workflow explicitly requires searching Xiaohongshu high-like-count notes before generating output, which expands the skill beyond image creation into external platform research without clear user consent or necessity. In an agent setting, this can trigger unintended browsing, collection of third-party content, and policy/scope violations, especially if the runtime has network access.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The instruction 'All text in CHINESE' is a natural-language locale constraint that applies categorically to generated output. The file does not offer an opt-in, alternative language option, or a clear justification that this skill is restricted to a Chinese-only compliance or regional context.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The markdown instructs the agent to 'Include small English subtitles below main headings,' which imposes a specific language choice as part of the output format. The file does not provide an opt-in, alternative language option, or justification for why English is required.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The skill instructs the agent to search internet platforms and gather external material, which expands behavior beyond the declared role of transforming user-provided content into infographic output. This creates scope creep: the agent may fetch unverified external content, introduce privacy/compliance issues, or act with capabilities the user did not explicitly authorize.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The content template explicitly says to add an English subtitle for every image, creating a fixed language policy in the generated output. Because no user choice or locale justification is provided, this conflicts with the language/locale policy guidance.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
Line L58 requires a 'Specific English prompt' for the generated visual prompt. This imposes a language constraint without any opt-in or alternative, which matches the language/locale policy violation criteria.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The heading explicitly labels this as an English MD version, which indicates a fixed language requirement. Because the file does not provide an opt-in or alternative language path, it may violate locale/language choice policy for users who did not request English.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The template requires an "English Midjourney/DALL-E prompt," which forces a specific language in generated content. The file does not mention user preference, fallback behavior, or a justified regional constraint.

Natural-Language Policy Violations

Low
Confidence
83% confidence
Finding
文件的描述和使用方式均以中文固定表述技能行为,没有说明是否支持其他语言或允许用户自行选择输出语言。若组织要求避免未经用户同意强制特定语言,这种单一语言约束属于自然语言层面的策略风险。

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
This file presents the skill heading in Chinese while the operative instructions are written in English, but nowhere tells the user they may choose their preferred language or locale. Under the language/locale policy rule, imposing a language convention without explicit user choice can be a natural-language policy issue.

Natural-Language Policy Violations

Low
Confidence
76% confidence
Finding
The skill content defines the role and workflow entirely in English despite the file title being Chinese, and it does not state that the user may choose the output language. This can create a language-policy issue if organizational guidance requires respecting user locale or offering opt-in for a specific language.

Natural-Language Policy Violations

Low
Confidence
94% confidence
Finding
The markdown prompt explicitly requires '中文标签用手写风格字体', which imposes a specific language choice. Under the policy criteria, forcing a language or locale without offering user choice or documenting a justified regional constraint is a natural-language policy violation.

Static analysis

No suspicious patterns detected.