Back to skill

Security audit

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

Security checks for vulnerabilities and agentic risk

Overview

This image-optimization skill is coherent, but it can broadly trigger and then install or upgrade global tools and configure an API key, so users should review it before use.

Install only if you intend to use LinkPix/qhkit for product-image generation and are comfortable with a global npm CLI, possible Node setup, local image upload to the service, and API-token configuration. Prefer running it in an isolated environment, avoid pasting long-lived secrets into chat or shell history, and require explicit approval before installing or upgrading packages.

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:46
Finding
Unpinned Global Installation of a Third-Party Executable npm Package## Vulnerability Details **File Location**: `SKILL.md`, lines 42–47 and 68–71 **Vulnerability Type**: Supply-chain exposure through unpinned, globally installed executable dependencies **Risk Level**: Medium ```bash npm i -g @iqinghu/qhkit ``` ```bash npm i -g @iqinghu/qhkit@latest ``` ### Technical Analysis The Skill instructs the agent to globally install the third-party `@iqinghu/qhkit` npm package without pinning it to a reviewed version. It also directs the agent to install the latest available release automatically when certain responses or notices are encountered. npm installation can execute package lifecycle scripts, while the resulting `qhkit` executable subsequently processes local image paths and an API token. The installed package therefore executes with the permissions of the agent's operating-system account and can access resources available to that account. Global installation also modifies shared user-level or system-level tooling beyond what is strictly required for a single image-generation task. A project-local, pinned installation would provide a narrower trust and modification boundary. The optional use of an alternative npm registry introduces an additional supply-chain trust point. The audit did not inspect the external package, its releases, or the registry infrastructure; consequently, this finding identifies unsafe dependency acquisition practices rather than evidence that the current package is malicious. The separately flagged checksum pipeline is not remote shell execution. It sends the downloaded checksum manifest to `grep` and `sha256sum`, not to a command interpreter, and the instructions require successful verification before archive extraction. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, a future package release, or a configured registry distribution path. 2. The compromised version publishes malicious lifecycle code or a malicious `qhkit` executab ...[truncated 1419 chars]
Remediation
## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to a specific, reviewed version instead of using an implicit current version or `@latest`. 2. Record and verify the expected package integrity hash or use a lockfile with integrity metadata. 3. Remove automatic upgrade instructions based solely on CLI-controlled messages. Require explicit user approval and security review before changing versions. 4. Prefer a project-local installation over `npm i -g` to minimize changes to shared tooling and constrain the installation scope. 5. Execute the dependency in a sandbox or restricted service account with access only to the intended input images and required network endpoints. 6. Disable npm lifecycle scripts during installation where compatible, and separately review any required scripts before allowing them to execute. 7. Prefer the official npm registry. If a mirror is necessary, document its trust assumptions and verify that downloaded package integrity matches the expected official artifact. 8. Avoid storing the API token in broadly accessible configuration. Supply it through a scoped secret mechanism and ensure it is not exposed in command history, logs, or subprocess output. 9. Review the installed package contents and transitive dependencies before deployment, including lifecycle scripts, network behavior, file access, and credential handling.
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 (4)

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill directs the agent to install Node.js, globally install/upgrade qhkit, and modify PATH as part of normal execution. That expands the skill from image optimization into host modification and package acquisition, increasing supply-chain and persistence risk if triggered in environments where such changes are unnecessary or not user-approved.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
The skill instructs the agent to solicit, set, or consume a qhkit API token, including storing it via CLI config or environment variables. This introduces credential-handling behavior beyond simple image editing and risks collecting, persisting, or exposing secrets in logs, shell history, or agent state.

Vague Triggers

High
Confidence
92% confidence
Finding
The metadata says the skill must trigger for broad requests like improving image quality, making images look more premium, or increasing click-through rate. Because the skill also contains installation and credential-setup behavior, this broad mandatory activation can cause unnecessary system changes or secret solicitation during ordinary image-editing requests.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The trigger examples are generic phrases such as 'optimize this main image' or 'make the picture look more premium,' which overlap heavily with common image-editing tasks. In context, that ambiguity is risky because invoking this skill may lead the agent into external CLI use, package installation, and token setup when the user did not ask for those actions.

Static analysis

No suspicious patterns detected.