Back to skill

Security audit

图片抠图 Image Segmentation

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed wrapper for a hosted image-matting CLI, with ordinary cloud-upload and API-key risks but no artifact-backed malicious behavior.

Install only if you trust the dLazy npm package and service. Prefer npx or another temporary/isolated execution path over global installation, review the linked CLI source when possible, and only pass image files you are comfortable uploading to dLazy. Use a revocable API key and rotate it if you stop using the tool.

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
Unverified Third-Party CLI Executes Outside the Audited Project Boundary<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:4, 49-56`; mirrored in `SKILL-cn.md:4, 49-56` **Vulnerability Type**: Third-party supply-chain exposure through npm and npx execution **Risk Level**: Medium ### Vulnerable Code Snippet From `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 imageseg -h for help."}} ``` From `SKILL.md:49-56`: ```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 instructions appear in `SKILL-cn.md:4, 49-56`. ### Technical Analysis The Skill delegates its functional behavior to the external npm package `@dlazy/cli@1.2.3`. Both the global installation command and the `npx` alternative retrieve and execute code that is not included in the audited project. Pinning the package version reduces version drift but does not independently establish the integrity of the downloaded artifact or its transitive dependencies. The audited project contains no vendored CLI source, dependency lockfile, package digest, signature, or verifiable build provenance. Therefore, the effective code that performs authentication, local file access, media upload, result download, and API communication cannot be validated from the two Skill documents. This finding does not establish that ...[truncated 1996 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Include the exact reviewed CLI source and dependency lockfile in the auditable artifact, or link the package version to an immutable source revision. 2. Publish and verify a cryptographic digest for the expected npm package artifact before execution. 3. Use npm provenance or trusted package signatures and document the verification procedure. 4. Audit all transitive dependencies and package lifecycle scripts associated with `@dlazy/cli@1.2.3`. 5. Prefer execution in an isolated, least-privilege environment with access restricted to only the input files required for image segmentation. 6. Prefer temporary, non-global installation over `npm install -g` to reduce persistent system changes. 7. Disable npm lifecycle scripts where compatible with the package and explicitly required functionality. 8. Restrict outbound network access to the documented endpoints after verifying that they are sufficient for operation. 9. Store the API key using an operating-system credential manager where possible, and ensure that configuration files remain accessible only to the owning user. 10. Require explicit user confirmation before uploading local files to the hosted service. ]]>
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 (4)

Ae1

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

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The documented `dlazy imageseg -h` output shows only `--image`, `--dry-run`, `--no-wait`, `--timeout`, and `--save` options, with no `--prompt` parameter. However, the example command uses `--prompt` and the error table says `--prompt` is a required option, which actively conflicts with the stated command interface and could mislead agents about what the skill actually does.

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.