Back to skill

Security audit

AI电商服装换色 | 服装换色 | 换颜色 | SKU换色 | 青虎AI

Security checks for vulnerabilities and agentic risk

Overview

The skill performs the advertised clothing recolor task, but its setup and upgrade instructions allow broad, mutable local code execution that users should review before installing.

Install only if you are comfortable letting the agent install or upgrade local Node/npm tooling for this service. Prefer preinstalling a reviewed qhkit version yourself, avoid executing upgrade commands copied from CLI response messages, keep the API token scoped to this service, and run the skill only on images and directories you are willing to expose to the external provider.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:65
Finding
Execution of Upgrade Commands Supplied Through Remote CLI Responses<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 65-66 **Vulnerability Type**: Remote payload retrieval and execution through trusted response content **Risk Level**: High ### Relevant Snippet The relevant instruction, translated into English, states: > If the command returns `{"ok":false,"stage":"version",...}`, the message contains the upgrade command; execute it as provided. ### Technical Analysis The Skill instructs the Agent to execute an upgrade command obtained from the `message` field of a `qhkit` response. Although the document later presents a fixed npm upgrade command, the instruction to execute response-supplied commands “as provided” does not constrain execution to that fixed command. Response text from a remotely connected CLI must be treated as untrusted data rather than executable instructions. The effective command can change after the Skill has been reviewed if the remote service, npm package, update infrastructure, or CLI response-processing path is compromised. This creates a remote command-execution channel under the Agent's local user identity. It exceeds the minimum privileges required to detect an outdated CLI and inform the user or run a hard-coded, validated upgrade operation. ### Attack Path 1. An attacker compromises the Qinghu service, the installed `qhkit` package, its update mechanism, or another component controlling CLI responses. 2. The compromised component returns a version-stage failure containing an attacker-selected shell command in its `message` field. 3. The Agent follows the Skill instruction to execute the command as provided. 4. The command runs with the permissions and environment of the Agent process. 5. The payload can access files, environment variables, configured API tokens, and other resources available to that account. ### Impact Assessment Successful exploitation permits arbitrary command execution with the Agent's current operating-system privileges. Potential consequences in ...[truncated 565 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove the instruction to execute commands contained in a CLI response. - Treat every response `message` field as display-only, untrusted data. - Permit upgrades only through a hard-coded command with an explicit argument allowlist, for example: ```bash npm install --global @iqinghu/qhkit@<approved-version> ``` - Pin the upgrade to an audited version rather than accepting an arbitrary version or command from the service. - Reject response text containing shell operators, substitutions, redirections, additional commands, URLs, or unexpected arguments. - Require explicit user confirmation before installing or upgrading local software. - Run installation in a restricted environment without unrelated credentials or sensitive project access. - Verify package provenance and integrity before execution. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:43
Finding
Unpinned and Globally Installed Third-Party CLI Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 43-47 and line 69 **Vulnerability Type**: Mutable third-party dependency installation **Risk Level**: Medium ### Relevant Snippet ```bash npm i -g @iqinghu/qhkit ``` The documented fallback dynamically resolves and executes the package: ```bash npx @iqinghu/qhkit <command> ... ``` The documented upgrade operation explicitly selects the mutable latest release: ```bash npm i -g @iqinghu/qhkit@latest ``` ### Technical Analysis The Skill installs `@iqinghu/qhkit` without pinning an audited version or package integrity value. It also recommends `npx` as a fallback and `@latest` for upgrades. These mechanisms resolve package content at execution time, allowing the effective executable code to change after this Skill has been audited. npm packages can run lifecycle scripts during installation and subsequently execute arbitrary JavaScript when their CLI entry point is invoked. If the package publisher account, npm release process, registry, mirror, or a future package version is compromised, malicious code could execute locally. Global installation also grants the dependency broader and longer-lived influence over the user's command environment than a temporary or project-local installation. This exceeds the minimum privilege necessary to invoke a clothing-recoloring client. ### Attack Path 1. An attacker compromises the npm publisher account, release pipeline, registry distribution path, or a future package release. 2. The attacker publishes a malicious version under the legitimate `@iqinghu/qhkit` package name. 3. The Agent runs the unpinned global installation, the `npx` fallback, or the `@latest` upgrade. 4. npm downloads the attacker-controlled release. 5. Malicious lifecycle scripts execute during installation, or malicious package code executes when `qhkit` is invoked. 6. The package accesses resources available to the Agent account and may modify globally installed user tooling. ...[truncated 758 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Pin `@iqinghu/qhkit` to a specifically reviewed version rather than using an unversioned package or `@latest`. - Use a lockfile and verify npm integrity metadata before installation. - Prefer a project-local installation over `npm install --global`. - Avoid `npx` execution of packages that have not already been installed and verified. - Require explicit user approval before any dependency installation or upgrade. - Where compatible, disable npm lifecycle scripts during installation: ```bash npm install --ignore-scripts --save-exact @iqinghu/qhkit@<approved-version> ``` - If lifecycle scripts are required, inspect and approve them before installation. - Use only a trusted registry. Treat the mirror as a separate supply-chain trust dependency and verify retrieved package integrity against an independently trusted source. - Run the CLI in a sandbox with access limited to the required input images, output directory, network endpoint, and token. - Do not expose unrelated credentials or project directories to the dependency. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (1)

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
The skill includes extensive environment bootstrap instructions to install Node, globally install an npm package, download binaries, and modify PATH. That behavior exceeds the narrow business purpose of a clothing recolor skill and creates unnecessary supply-chain and host-modification risk if an agent follows it automatically, even though the commands are not overtly malicious.

Static analysis

No suspicious patterns detected.