Back to skill

Security audit

电商白底图生成 | 批量抠图 | 去背景 | 透明底图 | 青虎AI

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its white-background image purpose, but it tells the agent to install or update unpinned tools and store an API token, so users should review it before installing.

Install only if you are comfortable with qhkit, Qinghu AI processing uploaded images, and a local API token configuration. Prefer running it in an isolated environment, avoid sensitive product images, and require confirmation before installs or upgrades.

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:42
Finding
Unpinned Third-Party CLI Installation and Automatic Upgrade<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 42–66 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```bash npm i -g @iqinghu/qhkit ``` Fallback installation through a mirror or `npx` is also recommended: ```bash npm i -g @iqinghu/qhkit --registry=https://registry.npmmirror.com npx @iqinghu/qhkit <command> ... ``` The upgrade procedure installs the latest available release without pinning it: ```bash npm i -g @iqinghu/qhkit@latest ``` The mirror may again be selected during upgrades: ```bash npm i -g @iqinghu/qhkit@latest --registry=https://registry.npmmirror.com ``` ### Technical Analysis The Skill directs the Agent to install and execute an externally maintained npm package that is not included in the audited project. Neither the normal installation nor the `npx` fallback pins an exact package version or validates package integrity. The upgrade procedure explicitly selects `@latest`, allowing the code executed by future Skill invocations to change after this review. npm installation can execute package lifecycle scripts, while subsequent `qhkit` or `npx` invocation executes the installed package directly. Consequently, compromise of the package, its maintainer account, the registry distribution path, or the optional mirror could result in arbitrary code execution under the account performing the installation. Global installation increases the dependency's system-wide exposure within the user's npm environment. Although the instructions do not request `sudo` and recommend `npx` after permission failures, a user who independently runs the global installation with elevated privileges could increase the resulting impact. The optional `registry.npmmirror.com` fallback introduces an additional supply-chain trust boundary. No evidence establishes that the mirror or package is malicious; the risk is caused by mutable, unpinned executable dependencies and the absence of independent ...[truncated 2145 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to a reviewed, exact version rather than using an unconstrained package name or `@latest`. 2. Record and verify the expected package integrity hash before installation. 3. Remove automatic upgrade instructions. Require a separate review and integrity update before adopting a new release. 4. Prefer a project-local installation governed by a lockfile over global installation: ```bash npm install --save-exact @iqinghu/qhkit@<reviewed-version> ``` 5. Invoke the locked local binary instead of allowing `npx` to resolve an arbitrary current release: ```bash ./node_modules/.bin/qhkit ... ``` 6. Where compatible with the package, disable lifecycle scripts during installation: ```bash npm install --ignore-scripts --save-exact @iqinghu/qhkit@<reviewed-version> ``` If lifecycle scripts are required, review them before permitting execution. 7. Use the primary npm registry by default. If a mirror is operationally necessary, independently validate its provenance and verify package integrity against a trusted source. 8. Run the CLI as an unprivileged, isolated account or inside a restricted container with access only to the specific input and output files needed for the image-processing task. 9. Provide the token through a narrowly scoped secret mechanism, prevent it from appearing in shell history or logs, and rotate it after any suspected dependency compromise. 10. Inform users that local images are uploaded to an external service and obtain consent before processing confidential or sensitive material. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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)

Description-Behavior Mismatch

Medium
Confidence
91% confidence
Finding
The skill embeds extensive environment bootstrapping, package installation, upgrade, and runtime setup instructions that go well beyond describing how to remove image backgrounds. In an agent setting, this expands the operational scope from image editing to modifying the host environment, increasing supply-chain, persistence, and unintended-execution risk if the agent follows these steps automatically.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill instructs the agent/user to obtain an API token from a website and persist it via CLI config or an environment variable. In an agent context, this can prompt credential harvesting, storage of long-lived secrets on the host, and reuse outside the immediate task, which is disproportionate to a simple white-background image-editing workflow.

Static analysis

No suspicious patterns detected.