Back to skill

Security audit

文生图 Vidu Q2

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Vidu Q2 image-generation skill using dLazy's CLI and cloud API, with the main cautions being the third-party npm CLI, API key storage, and uploads of user-selected media.

Install only if you are comfortable running the dLazy npm CLI and sending prompts plus any selected media files to dLazy's cloud service. Prefer the pinned npx invocation if you do not want a persistent global binary, use a revocable dLazy API key, avoid submitting private media unless intended, and review the CLI package/source before relying on it for sensitive work.

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
Execution of an Externally Distributed npm CLI Without Artifact Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:5,56-62`; `SKILL-cn.md:5,56-62` **Vulnerability Type**: Third-party supply-chain exposure **Risk Level**: Medium ### Vulnerable Code Snippets `SKILL.md:5`: ```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 viduq2-t2i -h for help."}} ``` `SKILL.md:56-62`: ```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. ``` `SKILL-cn.md:5`: ```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":"当调用此技能时,可以使用 dlazy viduq2-t2i -h 查看帮助信息。"}} ``` `SKILL-cn.md:56-62`: ```markdown 如果你不希望在系统上长期保留一个全局 CLI,可以按需运行: ```bash npx @dlazy/cli@1.2.3 <command> ``` 如选择全局安装,技能的 `metadata.clawdbot.install` 字段已固定到 `npm install -g @dlazy/cli@1.2.3`。安装前建议先到 GitHub 仓库审阅源码。 ``` ### Technical Analysis The Skill instructs the Agent or user to retrieve and execute `@dlazy/cli@1.2.3` from the npm registry, either throug ...[truncated 2738 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Vendor the reviewed CLI implementation or provide a locally auditable release artifact as part of the Skill distribution. 2. Publish a cryptographic digest or signed provenance record for the exact package artifact and verify it before execution. 3. Provide a lockfile or equivalent manifest that pins the full transitive dependency graph rather than only the top-level package version. 4. Use reproducible builds and signed release attestations to demonstrate that the npm artifact corresponds to the reviewed source repository. 5. Prefer a sandboxed, least-privilege invocation over a global installation. Restrict filesystem access to explicitly selected input and output paths. 6. Restrict outbound network access to the documented service endpoints where the execution environment supports network policy enforcement. 7. Disable npm lifecycle scripts during installation where compatible with the package, and separately verify whether the CLI requires them. 8. Avoid exposing the API key through command-line arguments. Store it in a permission-restricted credential store and use a narrowly scoped, revocable key. 9. Document package-verification and incident-response procedures, including API-key rotation and removal of globally installed binaries following a suspected package compromise. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (6)

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
83% confidence
Finding
该文件整体以中文面向用户,且未说明这是仅适用于中文用户的区域化技能,也未要求在执行前确认用户语言偏好。根据语言/locale 政策,若技能默认强制特定语言而无用户选择或正当约束,应视为自然语言策略违规。

Vague Triggers

Medium
Confidence
96% confidence
Finding
L018-L019 将“生成图片、编辑图片”“文生图、图生图”列为触发关键词,这些表述非常通用,缺少特定产品名、命令前缀或上下文限制。文档也未提供排除条件或负例,容易让代理在普通图片处理请求中误调用该技能。

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 keywords are broad enough to match common user intents such as 'generate image', 'edit image', or 'text to image', which can cause this skill to be invoked in situations where the user did not specifically intend to use the dLazy service. In an agent ecosystem, this can lead to unintended external API calls, file uploads, or credential prompts, increasing the risk of unnecessary data exposure and incorrect tool selection.

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.