Back to skill

Security audit

图像生成 可灵 Kling Image O1

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed cloud image-generation wrapper, but it relies on an external npm CLI and sends prompts and provided media to dLazy services.

Install only if you trust dLazy and the @dlazy/cli npm package. Prefer npx if you do not want a persistent global CLI, avoid passing sensitive local files, and remember that prompts, selected media, generated outputs, and the API key flow involve dLazy infrastructure.

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:5
Finding
External npm CLI Executed Without Artifact Integrity Verification## Vulnerability Details **File Location**: `SKILL.md`, lines 5 and 51-63; `SKILL-cn.md`, lines 5 and 51-63 **Vulnerability Type**: Third-party supply-chain exposure **Risk Level**: Medium ### Vulnerable Code Snippet Both documents declare and recommend executing the same external npm package: ```json "install": "npm install -g @dlazy/cli@1.2.3", "installAlternative": "npx @dlazy/cli@1.2.3" ``` ```bash npx @dlazy/cli@1.2.3 <command> ``` ```bash npm install -g @dlazy/cli@1.2.3 ``` ### Technical Analysis The Skill delegates its executable behavior, authentication handling, filesystem access, and network communication to `@dlazy/cli@1.2.3`, which is retrieved from an external npm registry. The package implementation is not included in the audited project. Pinning the dependency to version `1.2.3` limits version drift, but the Skill does not specify an npm integrity hash, an approved lockfile, a signed release artifact, or a verified source commit corresponding to the published package. Consequently, the reviewed Skill files alone cannot establish the integrity or behavior of the executable artifact. npm package installation may also execute package lifecycle scripts. The global installation option persists the executable outside the Skill directory and makes it available to later sessions. This does not prove that the referenced package is malicious; it creates a supply-chain trust boundary that is not controlled or verifiable from this project. ### Attack Path 1. An attacker compromises the npm publisher account, package publication workflow, registry artifact, or another component of the package supply chain. 2. The affected artifact is made available under the package and version referenced by the Skill, or the expected artifact is otherwise substituted in an environment lacking integrity enforcement. 3. An Agent follows the Skill instructions and runs `npx @dlazy/cli@1.2.3` or installs the package ...[truncated 1289 chars]
Remediation
## Remediation Suggestions 1. Vendor the reviewed CLI implementation into the Skill package, or distribute it through a controlled and authenticated artifact repository. 2. Record and enforce the expected package integrity hash through a reviewed lockfile or equivalent artifact-verification mechanism. 3. Link version `1.2.3` to a specific reviewed source commit and verify that the published npm artifact is reproducibly built from that commit. 4. Prefer ephemeral, least-privilege execution over global installation. Remove the global installation recommendation unless persistence is operationally necessary. 5. Disable npm lifecycle scripts where compatible with the verified package, for example by using an approved installation process with lifecycle-script restrictions. 6. Execute the CLI in a sandbox with access limited to required media files, configuration data, and the documented domains `api.dlazy.com` and `files.dlazy.com`. 7. Store API credentials using an operating-system credential manager where possible, and ensure that credentials are scoped, rotatable, and not exposed to unrelated subprocesses. 8. Add package provenance or signature verification to the installation workflow and fail closed if verification cannot be completed.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Ae1

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

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger keywords include broad everyday phrases such as generating or editing pictures, which can cause the skill to activate in contexts the user did not specifically intend. In an agent environment, overbroad activation increases the chance of unreviewed API calls, unintended file uploads, and accidental transmission of prompts or local media to third-party services.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The document states that local file paths provided to the CLI will be uploaded to `files.dlazy.com`, but it does not present a prominent, user-facing privacy warning at the point of use. In an agent setting, users may assume local paths are processed locally, so this omission can lead to inadvertent disclosure of sensitive media or other local files to a remote service.

Description-Behavior Mismatch

Medium
Confidence
91% confidence
Finding
The skill claims to support text-to-image and image-to-image, but the documented behavior states that local image, video, and audio paths may be uploaded to the remote service. This expands the effective data-handling scope beyond what a user would reasonably expect, increasing the risk of unintended sensitive file exfiltration if an agent or user supplies non-image local paths.

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.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger list includes generic phrases such as "generate image, edit image" and "text to image, image to image," which are broad enough to match ordinary user requests rather than a narrowly scoped skill invocation. The file does not provide exclusion conditions or negative examples to clarify when this skill should or should not activate.

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.

Intent-Code Divergence

Low
Confidence
96% confidence
Finding
The help text documents the flag as `--images [images...]` at L085, but the examples at L123 and L126 use `--image`. This is an active documentation-to-interface inconsistency that can mislead agents about how the command actually works.

Natural-Language Policy Violations

Low
Confidence
78% confidence
Finding
The description and heading include both English and Chinese, but the skill does not explicitly state whether the user may choose their preferred language or how language selection should work. This can create ambiguity around locale behavior and may implicitly steer responses toward a language without clear opt-in.

Static analysis

No suspicious patterns detected.