Back to skill

Security audit

电商场景图生成 | 场景合成 | 商品场景 | 营销场景图 | LinkPix

Security checks for vulnerabilities and agentic risk

Overview

The skill does the advertised product scene-image generation, but its setup instructions can automatically install and upgrade unpinned CLI tooling and Node components in the user's environment.

Review this before installing if you do not want a skill to change your local toolchain. Prefer a pinned, platform-managed qhkit install, avoid automatic @latest upgrades and npx fallback execution, and provide the QHKIT token only when you intend to use the LinkPix service and upload the selected product images.

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:43
Finding
Unpinned Third-Party CLI Installation and Automatic Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 43–76 **Vulnerability Type**: Third-party supply-chain exposure through mutable npm dependencies **Risk Level**: Medium ### Vulnerable Code ```bash npm i -g @iqinghu/qhkit ``` ```bash npx @iqinghu/qhkit [command] ... ``` ```bash npm i -g @iqinghu/qhkit@latest ``` The instructions also permit switching npm downloads to the third-party mirror `https://registry.npmmirror.com`. ### Technical Analysis The Skill instructs the agent to download and execute `@iqinghu/qhkit` without pinning an exact, reviewed version or independently verifying package integrity. The `@latest` upgrade command explicitly permits future package releases to be installed without review. The `npx` fallback can fetch and immediately execute the package. npm installation can execute package lifecycle scripts under the invoking user's account. A compromised publisher account, package release, registry, or configured mirror could therefore turn the installation step into arbitrary local code execution. Global installation increases exposure by placing executable content in a shared user or system-level npm location and is broader than necessary for a single Skill invocation. Installing a CLI is related to the declared image-generation functionality, but mutable global installation and automatic upgrades exceed the minimum necessary privilege and trust scope. A project-local, version-pinned, integrity-locked installation would provide the required functionality with less risk. The separately flagged checksum pipeline is not a `curl | bash` execution path: ```bash curl -fsSL https://nodejs.org/dist/v22.22.3/SHASUMS256.txt | grep ' node-v22.22.3-linux-x64.tar.xz$' | sha256sum -c - ``` It passes downloaded checksum data to `sha256sum`, not to a shell. However, obtaining both the Node.js archive and checksum file from the same fallback mirror does not protect against compromise of tha ...[truncated 1481 chars]
Remediation
## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to an exact reviewed version rather than using an unversioned package reference or `@latest`. 2. Commit a lockfile containing npm integrity metadata and use a deterministic installation method such as `npm ci`. 3. Install the dependency in an isolated project directory rather than globally. 4. Do not use automatic `npx` retrieval for uninstalled packages. Configure it to avoid installation or invoke only a previously verified local binary. 5. Remove automatic upgrade instructions. Require explicit user approval and a security review before changing dependency versions. 6. Verify the package tarball against a trusted, independently distributed digest or signed provenance before execution. 7. Avoid third-party registry mirrors where possible. If a mirror is required, document its trust implications and enforce integrity verification. 8. Run the CLI in a sandbox with restricted filesystem, environment-variable, and network access. Expose only the input images and token needed for the current operation. 9. Disable npm lifecycle scripts during installation where compatible, then explicitly run only reviewed setup operations. 10. Keep API tokens out of command history and scope them to the minimum permissions and lifetime supported by the service.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (3)

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill contains extensive environment bootstrapping and package installation instructions that go well beyond the core task of generating scene images. This increases attack surface by encouraging the agent to install software, modify PATH, fetch binaries, and configure credentials, which can lead to unintended system changes or supply-chain risk if invoked automatically.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The trigger text says the skill 'must' be invoked for broad classes of common product-image requests, which can cause over-invocation and unnecessary execution of external tooling. Because the skill can also install software and request configuration/token setup, an overly broad trigger raises the chance of accidental tool use and environment modification in ordinary conversations.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The 'when to trigger' section lists positive examples but provides no boundaries, negative examples, or ambiguity handling. In context, this makes the skill easier to invoke on loosely related requests, amplifying the risk of unnecessary external calls, credential prompts, or setup actions.

Static analysis

No suspicious patterns detected.