Back to skill

Security audit

电商印花裂变 | 印花多版本 | 图案裂变 | POD设计 | 青虎AI

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent image-generation purpose, but it asks agents to install or auto-upgrade an unpinned global CLI and store an API token, which deserves review before use.

Install only if you trust the qhkit npm package and Qinghu service. Prefer an isolated or pinned installation, avoid running from a privileged shell, protect the API token, and assume selected local images may be uploaded to the provider for generation.

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 Third-Party CLI Installation and Automatic Upgrade<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 6, 40–45, and 65–69 **Vulnerability Type**: Unpinned executable dependency and unsafe automatic upgrade **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 npx @iqinghu/qhkit ``` ```bash npm i -g @iqinghu/qhkit@latest ``` ### Technical Analysis The Skill installs and executes `@iqinghu/qhkit` without pinning it to a reviewed version. The package metadata, ordinary installation command, `npx` fallback, and automatic `@latest` upgrade can all retrieve executable package content that changes after this Skill has been audited. Installing an npm package can execute package lifecycle scripts. The installed CLI subsequently runs with the permissions and environment of the invoking process. Consequently, compromise of the package publisher, publishing credentials, registry delivery path, or a future package release could result in arbitrary local code execution. The documented fallback to `registry.npmmirror.com` additionally expands the trusted supply chain. Fetching a package and its metadata from the same registry or mirror does not provide independent integrity verification. Use of the CLI is necessary for the declared image-generation functionality, but globally installing an unpinned package and automatically upgrading to `@latest` exceed the minimum necessary trust and system modification. A project-local, exactly pinned, integrity-verified dependency would provide a narrower security boundary. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, registry delivery path, or configured mirror for `@iqinghu/qhkit`. 2. The attacker publishes or serves a malicious version as the current default or `latest` version. 3. The Skill runs `npm i -g @iqinghu/qhkit`, ` ...[truncated 1276 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to a specific, reviewed version in both metadata and installation examples: ```bash npm install --global @iqinghu/qhkit@EXACT_VERSION ``` 2. Remove automatic installation of `@latest`. Treat upgrades as a separate, reviewed maintenance action rather than an automatic response to runtime messages. 3. Avoid unpinned `npx` execution. If `npx` is retained, specify the exact version and prevent silent substitution: ```bash npx --yes @iqinghu/qhkit@EXACT_VERSION ``` 4. Prefer a project-local or isolated installation over a global installation to reduce modification of the user's tool environment. 5. Commit and enforce a lockfile with npm integrity data where the execution environment supports it. Verify the expected package tarball digest against a value maintained independently of the download registry. 6. Use the primary npm registry only where possible. If a mirror is required, document the additional trust boundary and verify artifacts against independently obtained hashes. 7. Evaluate whether the package functions correctly with lifecycle scripts disabled: ```bash npm install --ignore-scripts @iqinghu/qhkit@EXACT_VERSION ``` If lifecycle scripts are required, review and document them before deployment. 8. Run the CLI with minimum filesystem access, no elevated privileges, and only the environment variables required for the request. Supply the API token only to the specific CLI process where practical. 9. Explicitly inform users that selected local images are uploaded to an external service before invoking the CLI. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill instructs operators to place an API token into persistent CLI config or an environment variable, but it does not include any handling guidance to reduce credential exposure. In shared machines, shell history, process listings, dotfiles, logs, or world-readable config files can leak the token and allow unauthorized use of the account or API credits.

Static analysis

No suspicious patterns detected.