Back to skill

Security audit

AI电商图像生成 | 商品图生成 | 产品图 | 素材生成 | 青虎AI

Security checks for vulnerabilities and agentic risk

Overview

The skill's image-generation purpose is coherent, but it asks agents to install and upgrade an unpinned global npm CLI that will handle API tokens and uploaded images.

Review before installing. Use this only if you trust the Qinghu/qhkit npm package and are comfortable sending prompts, product/reference images, and a QHKIT token to the service. Prefer a pinned, reviewed qhkit version in an isolated environment, avoid admin privileges for global installs, and provide the token only as narrowly as practical.

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:6
Finding
Unpinned Globally Installed Executable Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:6`, `SKILL.md:54`, and `SKILL.md:75` **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: {"openclaw":{"emoji":"🎨","requires":{"bins":["qhkit"]},"install":[{"kind":"node","package":"@iqinghu/qhkit","bins":["qhkit"]}]}} ``` ```bash npm i -g @iqinghu/qhkit ``` ```bash npm i -g @iqinghu/qhkit@latest ``` ### Technical Analysis The Skill installs the executable npm package `@iqinghu/qhkit` without pinning an audited version or enforcing a package-integrity digest. The upgrade instruction explicitly installs `@latest`, allowing the package's effective code and behavior to change after the Skill itself has been reviewed. Because npm installation can execute package lifecycle scripts, a compromised package release, registry account, or configured mirror could result in arbitrary code execution during installation. The risk is elevated by the global installation scope and by the CLI's subsequent access to Qinghu API tokens, local image paths, generated assets, and network resources. The fallback use of `registry.npmmirror.com` creates an additional supply-chain trust dependency. This is not evidence that the mirror or package is malicious, but installation from either source without version and integrity enforcement leaves the Skill exposed to future upstream compromise. The Node.js bootstrap checksum pipeline at `SKILL.md:60-61` is not a `curl | bash` execution pattern. It downloads a fixed archive and validates it with `sha256sum -c` before extraction. Therefore, that pipeline is not classified as a confirmed vulnerability. ### Attack Path 1. An attacker compromises the npm publisher account, an upstream package release, or a configured package mirror. 2. The attacker publishes a malicious version of `@iqinghu/qhkit`, potentially containing a malicious npm lifecycle script or altered CLI implementation. 3. The Agent foll ...[truncated 1598 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to an exact version that has been reviewed: ```bash npm install -g @iqinghu/qhkit@<audited-version> ``` 2. Remove the automatic `@latest` upgrade instruction. Require review and approval of each new version before deployment. 3. Record and verify package integrity using a committed lockfile, expected npm integrity value, or an equivalent cryptographic verification mechanism. 4. Prefer a project-local or isolated installation over a global installation. Run the CLI from a constrained environment with access only to the files required for the current image-generation request. 5. Avoid administrative privileges. Do not recommend privilege escalation merely to make a global npm installation succeed. 6. Disable npm lifecycle scripts during installation where compatible: ```bash npm install --ignore-scripts @iqinghu/qhkit@<audited-version> ``` If lifecycle scripts are required, review them before permitting execution. 7. Verify package provenance, publisher identity, release history, and registry source before installation. Apply equivalent integrity controls when using the fallback mirror. 8. Provide the CLI token only at invocation time, use a narrowly scoped and revocable token where supported, and prevent unrelated processes from inheriting it. 9. Execute the dependency in a sandbox or container with restricted filesystem and network access to reduce the impact of a future supply-chain compromise. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (2)

Vague Triggers

Medium
Confidence
90% confidence
Finding
The metadata description says image-generation requests 'must trigger' the skill for broad classes of common prompts, which can cause over-invocation without clear boundaries or user confirmation. In an agent setting, overly broad mandatory triggering increases the chance of unintended external tool use, surprise network activity, or bypassing more appropriate skills and safety review paths.

Vague Triggers

Medium
Confidence
87% confidence
Finding
The trigger section contains catch-all wording for 'other' uncovered free-form generation/editing needs, creating ambiguous activation boundaries. This can make the agent invoke the skill on loosely related requests, increasing the risk of unnecessary command execution, dependency installation, and token/config handling for requests that may not truly require this tool.

Static analysis

No suspicious patterns detected.