Back to skill

Security audit

文生图 即梦 Jimeng T2I

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed cloud image-generation skill, with normal but important trust considerations around an external npm CLI, API-key storage, and uploads of files the user provides.

Install this only if you are comfortable using the dLazy service and @dlazy/cli. Prefer on-demand npx use over a global install when possible, review the package/source before use, avoid passing private local files unless you intend to upload them, and rotate or revoke the dLazy API key if you suspect compromise.

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 External npm Package Without Locally Auditable Implementation or Integrity Verification## Vulnerability Details **File Location**: `SKILL.md:5, 52-58`; equivalent instructions in `SKILL-cn.md:5, 53-59` **Vulnerability Type**: Third-party supply-chain dependency **Risk Level**: Medium ### Complete Code Snippet From `SKILL.md`: ```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 jimeng-t2i -h for help."}} ``` ```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 dependency installation and execution instructions occur in `SKILL-cn.md`. ### Technical Analysis The Skill delegates its security-sensitive behavior to the externally distributed npm package `@dlazy/cli@1.2.3`. That package is not included in the audited artifact, so its installation lifecycle, authentication handling, local-file access, upload behavior, and network requests cannot be verified from this project. Pinning the dependency to version `1.2.3` reduces unintentional version drift, but it does not cryptographically bind the Skill to a reviewed package artifact. The instructions provide neither a registry integrity digest nor a verified binary checksum. The global installation option also places executable code in the user's environment beyond the immediate invocation. This is a supply-chain trust-boundary issue rather than evidence that the n ...[truncated 1723 chars]
Remediation
## Remediation Suggestions 1. Bundle the required implementation with the Skill so the exact executed code can be reviewed together with the Skill. 2. If external distribution remains necessary, publish and verify a cryptographic digest for the exact npm artifact before execution. 3. Commit an appropriate lockfile with registry integrity metadata where the execution environment supports it. 4. Prefer a reviewed, locally installed dependency over automatic `npx` retrieval during Skill invocation. 5. Avoid global installation by default; install into an isolated, least-privileged project directory or sandbox. 6. Disable npm lifecycle scripts where compatible, for example through an audited installation workflow using `--ignore-scripts`. 7. Run the CLI without administrative privileges and restrict its filesystem and network access to the minimum required directories and documented endpoints. 8. Document the precise files, credentials, and endpoints the CLI can access, and require user confirmation before uploading local files. 9. Independently audit the source and built npm artifact for version `1.2.3`, including lifecycle scripts and transitive dependencies, before approving deployment. 10. Provide credential rotation guidance in case dependency compromise is suspected.
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

Vague Triggers

Medium
Confidence
95% confidence
Finding
文档将“即梦”“生成图片、文生图”“画一张图”列为触发关键词,其中“生成图片”和“画一张图”属于常见自然表达,缺少更具体的命令边界或排除条件。这会让技能在普通对话中也可能被不恰当地匹配触发。

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
97% confidence
Finding
The trigger keywords include generic everyday phrases like "generate image, text to image" and "draw a picture," which can cause the skill to be invoked in contexts where the user did not specifically intend to use this external CLI-backed integration. Because invocation may lead to authentication prompts, network calls, or uploads of referenced local files to third-party infrastructure, accidental activation increases the risk of unintended data exposure or unsafe tool execution.

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.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
“您必须明确告知用户”后的指令内容以中文固定表述,且当前技能文件整体面向中文,但未说明应根据用户语言偏好进行适配,也未写明这是仅限中文场景的区域性技能。按规则,这构成潜在的语言/locale 策略问题。

Static analysis

No suspicious patterns detected.