Back to skill

Security audit

图片素材搜索 Search Image

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be an image-search integration, but its docs mix Pixabay branding with a dLazy CLI/API flow that installs third-party code, stores an API key, and may send data to dLazy services.

Install only if you are comfortable trusting dLazy's CLI and service with your search terms, account API key, and any local media paths you intentionally provide. Prefer npx or another isolated execution method over a global install, review the CLI source first, and verify the command uses the intended --query search flow before sending sensitive content.

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 npm Package Is Installed and Executed## Vulnerability Details **File Location**: `SKILL.md:4,55-59` and mirrored configuration in `SKILL-cn.md:4,55-59` **Vulnerability Type**: Third-party dependency and supply-chain exposure **Risk Level**: Medium ### Vulnerable Code ```json "requires":{"bins":["npm","npx"]}, "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 functionality to the externally distributed npm package `@dlazy/cli@1.2.3`. The implementation of that package is not included in the audited project, so its lifecycle scripts and runtime behavior cannot be verified from this artifact. Pinning the dependency to version `1.2.3` limits unexpected version changes, but it does not authenticate the retrieved package independently or protect against compromise of that exact published artifact, its transitive dependencies, the npm account, or the package distribution channel. No package integrity hash, signature verification, vendored source, or installation sandbox is specified. The global installation alternative increases exposure because package lifecycle scripts execute during installation and the resulting executable persists in the user's global npm environment. The `npx` alternative avoids persistent global installation but still downloads and executes externally supplied package code. The same dependency instructions are duplicated in `SKILL-cn.md`, so both documented installation paths carry the same risk. ### Attack Path 1. An attacker compromises the npm package publisher, the package artifact for `@dlazy/cli@1.2.3`, or one of its unresolved transitive dependencies. 2. A user or agent follows the Skill metadata and runs either `npm install -g @dlazy/cli@1.2.3` or `npx @dlazy/cli@1.2.3`. 3. npm retrieves the compromised package and may execute its insta ...[truncated 1457 chars]
Remediation
## Remediation Suggestions 1. Vendor the required CLI implementation or include auditable source code in the Skill package. 2. Verify the npm artifact against a published cryptographic integrity hash or trusted signature before execution. 3. Commit and enforce a lockfile that pins all transitive dependencies, not only the top-level package version. 4. Review the package source, lifecycle scripts, and dependency tree for the exact published version. 5. Prefer ephemeral, isolated execution over global installation. Run the CLI in a container or sandbox with restricted filesystem and network access. 6. Disable npm lifecycle scripts with `--ignore-scripts` where the package can operate without them. 7. Restrict the CLI to only the documented API endpoints and only the files explicitly selected by the user. 8. Store API credentials using an operating-system credential manager where possible, and rotate the API key if dependency compromise is suspected. 9. Document package verification and uninstall procedures, particularly for the global installation path. 10. Apply the same hardened installation guidance to both `SKILL.md` and `SKILL-cn.md`.
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 (9)

Ae1

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

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill advertises itself as a Pixabay image search tool, but the metadata and body describe installation and execution of a dLazy CLI that sends requests to dLazy-controlled infrastructure. This kind of capability/implementation mismatch is dangerous because users and agents may grant trust, data, or credentials under false assumptions about the actual backend and data flow.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The file first claims the tool calls the Pixabay API, then later states that all requests go to dLazy APIs and uploaded media may be sent to files.dlazy.com. Contradictory provenance and routing information can mislead operators about third-party sharing, privacy boundaries, and supply-chain trust, increasing the risk of unintended data disclosure.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The command options specify `--lang [lang]` with a default of `zh`, which imposes a specific language behavior by default. This is a natural-language locale policy concern because the file does not indicate user choice or consent for that default in the skill instructions.

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.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The skill is presented as a narrow Pixabay image-search tool, but the documentation later describes a broader hosted dLazy API client that can transmit prompts and upload local media files to vendor-controlled endpoints. This mismatch can cause users or agents to disclose more data than expected and weakens informed consent about network, data handling, and tool scope.

Intent-Code Divergence

Medium
Confidence
92% confidence
Finding
The command is documented as an image search tool, but examples and error text reference a different '--prompt' parameter and generation-style async behavior. This inconsistency increases the risk that an agent invokes the wrong operation, sends unintended content to the backend, or handles outputs under incorrect assumptions.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The usage section specifies `--lang [lang]` with a default of `zh`, which imposes a specific locale choice by default. The file does not state that users can opt in to that locale or explain a region-specific justification for forcing Chinese as the default.

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.