Back to skill

Security audit

电商图文字修改 | 图片改字 | 替换文字 | 修改价格文字 | 青虎AI

Security checks for vulnerabilities and agentic risk

Overview

The skill's image text editing purpose is coherent, but its automatic unpinned global CLI installation and upgrade instructions create a supply-chain and persistent host-change risk users should review first.

Install only if you are comfortable letting the agent install and run the qhkit npm CLI, possibly globally, and upload target images/prompts to Qinghu's service using a token you provide. Prefer a pinned, reviewed qhkit version in an isolated environment, avoid automatic @latest upgrades, and keep the API token scoped and revocable.

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

Error
Location
SKILL.md:42
Finding
Unpinned Third-Party Package Installation and Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 42–45 and line 63 **Vulnerability Type**: Unpinned npm dependency installation and execution **Risk Level**: High ### Vulnerable Code ```bash npm i -g @iqinghu/qhkit ``` ```text Only when global installation fails because of permissions and privilege elevation is unavailable, fall back to `npx @iqinghu/qhkit <command> ...`. ``` ```bash npm i -g @iqinghu/qhkit@latest ``` ### Technical Analysis The Skill instructs the Agent to install `@iqinghu/qhkit` globally without pinning an audited version. It also permits direct execution through `npx` and explicitly directs upgrades to `@latest`. npm installation can execute package lifecycle scripts, while invoking the resulting CLI executes code supplied by the package publisher. Because the selected package version can change after this Skill has been reviewed, the effective executable payload is not fixed by the audited project. A compromised publisher account, malicious future release, or upstream supply-chain compromise could therefore introduce arbitrary code without requiring any modification to `SKILL.md`. Global installation unnecessarily broadens the package's footprint compared with an isolated, version-pinned installation. Although the instructions do not request root access and recommend `npx` when global installation encounters permission errors, installed package code still runs with all permissions of the Agent's operating-system account. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or an upstream dependency used by a future `@iqinghu/qhkit` release. 2. The attacker publishes a malicious release under the legitimate package name. 3. The Agent follows the Skill instructions and runs an unversioned installation, an `@latest` upgrade, or `npx`. 4. npm retrieves the attacker-controlled release from the configured registry or fallback mirror. 5. Malicio ...[truncated 1010 chars]
Remediation
## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to a specifically reviewed version instead of using an unversioned package or `@latest`. 2. Record and verify the expected npm integrity hash or package tarball digest before installation. 3. Remove automatic upgrade instructions. Require review and integrity verification before adopting each new release. 4. Avoid global installation where possible. Install the dependency in a dedicated, non-privileged project directory or isolated container. 5. Replace unrestricted `npx` execution with a version-pinned invocation and prevent implicit selection of a newer release. 6. Disable npm lifecycle scripts with `--ignore-scripts` if the audited package functions without them. If scripts are required, review them before installation. 7. Run the CLI with filesystem, environment-variable, and network access restricted to the minimum required for image processing. 8. Keep API tokens out of command history and ensure the token has narrowly scoped permissions, limited lifetime, and straightforward revocation. 9. Treat the fallback registry mirror as an additional supply-chain trust boundary and apply the same version and integrity validation regardless of registry.
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 (2)

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The skill includes extensive environment bootstrapping and software installation steps unrelated to the narrow task of editing text in images. That expands the skill's operational scope to downloading runtimes, installing global packages, altering PATH, and using fallback mirrors, which increases supply-chain and host-modification risk if invoked in an automated agent context.

Vague Triggers

Medium
Confidence
86% confidence
Finding
The metadata says image-text editing requests 'must trigger,' and the keyword set is broad enough to match many ordinary image-editing prompts. In an agent system, that can cause unintended or over-eager invocation of this skill, leading to unnecessary external tool use, data disclosure to the service, or bypass of safer/default handling paths.

Static analysis

No suspicious patterns detected.