Back to skill

Security audit

AI电商主图优化 | 主图美化 | 点击率提升 | 图片增强 | 青虎AI

Security checks for vulnerabilities and agentic risk

Overview

The skill has a clear product-image optimization purpose, but it gives agents broad permission to install and upgrade an unpinned external CLI and upload images to a third-party service.

Review this skill before installing. It is not evidence of malware, but you should only use it if you are comfortable with qhkit being installed or upgraded in your environment, your selected images being uploaded to Qinghu's service, and API-token based paid generation being used. Prefer a pinned, locally isolated qhkit install and ask the agent to confirm before uploads or credit-spending 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:41
Finding
Unpinned Third-Party CLI Installation and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 41–71 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```bash npm i -g @iqinghu/qhkit ``` ```bash npm i -g @iqinghu/qhkit@latest ``` The instructions also permit execution through: ```bash npx @iqinghu/qhkit <command> ... ``` ### Technical Analysis The Skill directs the agent to install and execute the externally maintained `@iqinghu/qhkit` npm package. The initial installation does not pin a version, while the upgrade procedure explicitly selects `@latest`. Consequently, the code ultimately executed can change after the Skill itself has been reviewed. Global npm installation can execute package lifecycle scripts and installs executable files into the user's global npm environment. Those operations run with the privileges of the user invoking npm. The permitted `npx` fallback may likewise download and execute a package that is not already present locally. The Skill also permits use of `registry.npmmirror.com` as a fallback registry. Although described as a mirror, this creates an additional supply-chain trust boundary. The project supplies no lockfile, package integrity value, audited source revision, or other mechanism for verifying the exact `qhkit` package contents before execution. The Node.js bootstrap command is not a `curl | bash` pipeline. It downloads a version-pinned archive and verifies it against the corresponding SHA-256 checksum list before extraction: ```bash curl -fsSLO https://nodejs.org/dist/v22.22.3/node-v22.22.3-linux-x64.tar.xz curl -fsSL https://nodejs.org/dist/v22.22.3/SHASUMS256.txt | grep ' node-v22.22.3-linux-x64.tar.xz$' | sha256sum -c - ``` This pipeline sends checksum text to `grep` and `sha256sum`; it does not send downloaded content to a shell. That portion is therefore not classified as remote payload execution. ### Attack Path 1. A user invokes the Skill to optimize a product image. 2. The agent de ...[truncated 1250 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to a reviewed, exact version rather than using an implicit current version or `@latest`. 2. Record and validate npm package integrity metadata, and retain a lockfile or equivalent verifiable dependency manifest. 3. Prefer a project-local installation in an isolated working directory instead of modifying the user's global npm environment. 4. Avoid automatic upgrades during normal Skill execution. Require explicit user approval before installing or changing executable software. 5. Where compatible with the package, disable npm lifecycle scripts during installation and invoke only reviewed entry points. 6. Treat registry mirrors as separate trust boundaries. Use a configured trusted registry and verify package integrity regardless of the selected source. 7. Run the CLI in a restricted environment with access only to the selected input images, required network destinations, and a narrowly scoped API token. 8. Inform users before uploading local images to the external service, and document the destination, retention policy, and token permissions. 9. Preserve the existing version-pinned Node.js download and SHA-256 verification procedure; do not replace it with a `curl | shell` command. ]]>
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 includes explicit environment bootstrapping and software installation steps for Node.js and the qhkit CLI, including network downloads and package installation. This materially expands the skill from image optimization into host modification and remote code acquisition, which is risky in agentic environments because it can trigger unreviewed installs, PATH changes, and execution of newly fetched tooling.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The trigger definition says the skill must activate for broad, common requests like improving image quality or making an image look more premium. Overbroad mandatory triggering increases the chance an agent invokes this skill in contexts where external CLI use, uploads, billing, or generative modification are unnecessary or inappropriate.

Vague Triggers

Medium
Confidence
84% confidence
Finding
The example trigger phrases are ambiguous and lack boundaries, so routine requests such as 'optimize this image' could match even when the user expects simple advice or a non-generative edit. In this skill, that ambiguity is more dangerous because invocation can lead to external processing, image upload, and paid generation workflows.

Static analysis

No suspicious patterns detected.