Back to skill

Security audit

AI电商图文广告 | 图文广告 | 营销图文 | 广告海报生成 | 青虎AI

Security checks for vulnerabilities and agentic risk

Overview

The skill’s image-ad purpose is coherent, but it directs automatic global tool installation, mutable upgrades, credential setup, and local media uploads without strong user consent or scoping controls.

Install only if you are comfortable with qhkit sending selected media and prompts to Qinghu’s service and with a Node/npm CLI being installed or upgraded on the host. Prefer a sandbox or project-local pinned install, provide the token through protected secret handling, and confirm each upload and install step before running it.

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 Automatic Upgrade<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 41-44 and line 62 **Vulnerability Type**: Unpinned and mutable third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```bash npm i -g @iqinghu/qhkit ``` ```bash npm i -g @iqinghu/qhkit@latest ``` The instructions also permit execution through `npx` without specifying an exact package version. ### Technical Analysis The Skill instructs the agent to install and execute `@iqinghu/qhkit` without pinning an audited version or integrity digest. It additionally directs automatic installation of the mutable `latest` release when certain errors or notices occur. An npm installation may execute package lifecycle scripts, while subsequent CLI invocation executes the installed package with the permissions of the invoking user. Because the resolved package contents can change after this Skill has been audited, the effective executable code is not bounded by the reviewed repository. The global installation is broader than necessary for the declared image-generation functionality. A project-local, version-pinned, isolated installation would provide the required command without modifying the user's global npm environment. The optional registry mirror adds another supply-chain trust dependency, although the audit found no evidence that the named package or mirror is currently malicious. ### Attack Path 1. An attacker compromises the npm package maintainer account, publication pipeline, package registry response, or approved mirror. 2. The attacker publishes a malicious version under the legitimate package name and makes it the currently resolved or `latest` version. 3. The Skill encounters a missing dependency, version-gate response, update notice, or applicable catalog notice. 4. Following the Skill instructions, the agent executes an unpinned global installation, `npx` invocation, or `@latest` upgrade. 5. Malicious lifecycle or runtime code executes with the permissions and ...[truncated 949 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to a specific audited version rather than resolving the current registry version: ```bash npm install --save-exact @iqinghu/qhkit@<audited-version> ``` 2. Remove the automatic `@latest` upgrade instruction. Require explicit review and approval before changing versions. 3. Record and verify package integrity using a committed lockfile, npm integrity metadata, or a separately verified package artifact. 4. Prefer a project-local installation over `npm i -g` to avoid unnecessary changes to the user's global tool environment. 5. Run the CLI in a sandbox or restricted worker with: - Access only to explicitly selected input and output files. - Minimal environment variables. - No unrelated credentials. - Restricted outbound network destinations. - No administrative privileges. 6. Avoid unpinned `npx` execution. If `npx` is necessary, specify an exact audited version and prevent fallback to unexpected local binaries. 7. Disable npm lifecycle scripts where compatible: ```bash npm install --ignore-scripts --save-exact @iqinghu/qhkit@<audited-version> ``` If lifecycle scripts are required, audit them before installation. 8. Treat registry mirrors as separate trust boundaries. Use a controlled registry proxy or verify that artifacts and integrity metadata match the approved upstream package. 9. Keep API tokens out of command-line arguments and minimize their exposure to third-party processes. Use a permission-restricted configuration file, protected secret injection, or another mechanism supported by the CLI. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The skill directs the agent to install Node.js, globally install an npm package, and modify PATH to satisfy a marketing-image task. Those host-level changes exceed the minimum capability needed for the advertised purpose and create unnecessary supply-chain and environment-modification risk, especially because they involve downloading and executing external software.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The skill instructs obtaining an external service API token and setting it persistently via CLI or environment variable. For a creative-generation skill, this introduces credential-handling risk and can cause sensitive tokens to be stored or exposed on the host without clear necessity, scoping, or user consent controls.

Vague Triggers

Medium
Confidence
83% confidence
Finding
The trigger language is broad enough to match many ordinary content-creation requests, making accidental invocation likely. In this skill, unintended invocation is more dangerous because activation can lead to software installation, external network calls, credential setup, and media upload to a third-party service.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill includes package installation, configuration, external API usage, and upload of local images/videos, but it does not require a clear upfront warning and consent flow for system modifications and off-device data transmission. This can cause users' files and metadata to be sent to third-party infrastructure and alter the host environment without informed approval.

Static analysis

No suspicious patterns detected.