Back to skill

Security audit

图像生成 GPT Image 2

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed dLazy image-generation wrapper, with normal cloud-upload and API-key risks plus a third-party npm CLI dependency.

Before installing, treat this as a cloud service integration: prompts and selected local media can be sent to dLazy, generated assets are hosted by dLazy, and an API key may be stored locally. Prefer npx over global install when possible, review the referenced CLI source/package, and only pass files you intend to upload.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:4
Finding
Execution of an Unverified Third-Party npm Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:4, 49-55`; `SKILL-cn.md:4, 48-54` **Vulnerability Type**: Third-party supply-chain exposure **Risk Level**: Medium ### Vulnerable Code `SKILL.md:4`: ```yaml metadata: {"clawdbot":{"emoji":"🤖","requires":{"bins":["npm","npx"]},"install":"npm install -g @dlazy/cli@1.2.3","installAlternative":"npx @dlazy/cli@1.2.3","homepage":"https://github.com/dlazy-ai/cli","source":"https://github.com/dlazy-ai/cli","author":"dlazyai","license":"see-repo","npm":"https://www.npmjs.com/package/@dlazy/cli","configLocation":"~/.dlazy/config.json","apiEndpoints":["api.dlazy.com","files.dlazy.com"]},"openclaw":{"systemPrompt":"When invoking this skill, use dlazy gpt-image-2 -h for help."}} ``` `SKILL.md:49-55`: ```markdown You can install on demand without persisting a global binary by running: ```bash npx @dlazy/cli@1.2.3 <command> ``` Or, if you prefer a global install, the skill's `metadata.clawdbot.install` field declares the exact pinned version (`npm install -g @dlazy/cli@1.2.3`). Review the GitHub source before installing. ``` The equivalent installation declarations also appear in `SKILL-cn.md:4, 48-54`. ### Technical Analysis The Skill does not contain the implementation used to perform image generation. Instead, it directs the environment to download and execute `@dlazy/cli@1.2.3` through either `npx` or a global npm installation. The dependency is pinned to a specific version, which limits unintentional version drift. However, the Skill does not declare or verify an integrity hash, vendor the dependency, or provide the package source for review within the audited artifact. Consequently, the effective executable code is outside the scope of this audit. Both installation mechanisms execute code obtained from the npm supply chain: - `npx` can download and immediately execute the package. - `npm install -g` installs package files globally and may execute npm lifecycle scripts under the invoking user's ...[truncated 2355 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Vendor and audit the exact CLI source used by the Skill, or include the minimal required implementation directly in the reviewed package. 2. Verify the downloaded package using an expected cryptographic integrity hash from a separately trusted source. 3. Maintain a lockfile or immutable dependency manifest covering all transitive dependencies, not only the top-level package version. 4. Publish reproducible build instructions so the npm artifact can be compared with the referenced source repository. 5. Disable npm lifecycle scripts where compatible, for example by using an installation process equivalent to `npm install --ignore-scripts`. 6. Prefer an isolated, non-privileged execution environment with: - Filesystem access limited to explicitly selected input and output files. - Network access restricted to documented dLazy endpoints. - No access to unrelated environment variables or user configuration. 7. Avoid global installation where possible, because it leaves executable package content available beyond the current task. 8. Require explicit user confirmation before uploading local files and clearly identify the destination service. 9. Store API credentials with restrictive permissions and use short-lived, scoped, and revocable credentials where supported. 10. Perform periodic review of the npm package, its maintainers, lifecycle scripts, release provenance, and transitive dependency tree. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Ae1

High
Category
analysis-evasion
Content
[English](./SKILL.md) · [中文](./SKILL-cn.md)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The skill content and agent instructions are written to operate in Chinese, including required user-facing guidance, but the file does not state that this locale is optional or limited to a China-specific compliance context. The policy allows locale constraints only when the user is given a choice or when the restriction is clearly documented and justified.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
The documentation states the skill 'will not access network or file system' while the very next sections describe uploading local files to remote storage, calling external APIs, and optionally saving results locally. This mismatch can mislead an agent or user into granting trust under false assumptions, increasing the risk of unintended data exfiltration of local media or unsafe execution of the CLI.

Whitespace Padding

Medium
Category
Prompt Injection
Content
## 错误处理

| Code | 错误类型                         | 示例信息                                                                                                                 |
| ---- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| 401  | 未授权 (API Key缺失或无效)       | `ok: false, code: "unauthorized", message: "API key is missing or invalid"`                                                              |
| 501  | 缺少必填参数                     | `error: required option '--prompt <prompt>' not specified`                                                               |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Whitespace Padding

Medium
Category
Prompt Injection
Content
## Error Handling

| Code | Error Type                         | Example Message                                                                                                          |
| ---- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| 401  | Unauthorized (No API Key)          | `ok: false, code: "unauthorized", message: "API key is missing or invalid"`                                                              |
| 501  | Missing required parameter         | `error: required option '--prompt <prompt>' not specified`                                                              |
Confidence
70% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Static analysis

No suspicious patterns detected.