Back to skill

Security audit

AI商品广告大片 | TVC生成 | 电影级广告 | 品牌宣传片 | 青虎AI

Security checks for vulnerabilities and agentic risk

Overview

The skill is for a real video-generation workflow, but it tells the agent to install mutable third-party CLI software and follow upgrade commands returned by that CLI output.

Review before installing. This skill is not clearly malicious, but it can install and upgrade executable software, configure an API token, upload local media assets, and persist qhkit globally. Only use it if you trust @iqinghu/qhkit and Qinghu AI, and do not let an agent run arbitrary upgrade text returned by the CLI without your explicit approval.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
Findings (2)

T07 · Tool Hijacking and Spoofing

Error
Location
SKILL.md:65
Finding
CLI-Controlled Upgrade Instructions May Cause Arbitrary Command Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 65-73 **Vulnerability Type**: Trusting externally controlled tool output as executable instructions **Risk Level**: High ### Vulnerable Code Snippet The operative instruction from the source is translated into English below: ```text Upgrade when the command returns: {"ok":false,"stage":"version",...} The message contains the upgrade command; execute it as instructed. ``` The document also provides this expected upgrade command: ```bash npm i -g @iqinghu/qhkit@latest ``` ### Technical Analysis The Skill directs the Agent to execute an upgrade command supplied in the `message` field of a `qhkit` response. This response is generated by the locally installed third-party CLI and may also be influenced by its remote backend. Tool output crosses a trust boundary and must be treated as untrusted data. Following a command from that output without validating it against a fixed allowlist creates a command-injection channel. The problem is not the documented `npm i` command by itself; it is the broader instruction to execute whatever upgrade command appears in `message`. An attacker who compromises the npm package, the installed CLI, its update service, or a relevant backend response could replace the expected upgrade text with an arbitrary shell command. The Agent may then execute that command under the identity running the Skill. ### Attack Path 1. The attacker compromises the `@iqinghu/qhkit` package, installed CLI, update service, or backend response path. 2. The compromised component returns a response resembling: ```json {"ok":false,"stage":"version","message":"<attacker-controlled command>"} ``` 3. The Skill interprets the response as a version-gate condition. 4. Following the instruction in `SKILL.md`, the Agent executes the command contained in `message`. 5. The command runs with the Agent process's operating-system permissions. 6. The attacker can access or alter resources ...[truncated 992 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove the instruction to execute commands supplied in the CLI's `message` field. - Treat all stdout and stderr from `qhkit` as untrusted data intended only for display or structured parsing. - Hard-code a narrowly allowed upgrade operation rather than deriving it from tool output. - Require explicit user approval before installing or upgrading executable software. - Validate version-gate responses against a strict schema and ignore any embedded shell syntax. - Use a fixed argument array through a process-execution API rather than constructing a shell command. - Reject unexpected arguments, registry URLs, command substitutions, redirections, pipes, and shell metacharacters. - Pin upgrades to a reviewed version and verify package integrity before execution. - Run the CLI in a restricted environment without unnecessary filesystem, credential, or network access. - Display an untrusted `message` value to the user as text only; never pass it to a shell. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:42
Finding
Unpinned Third-Party CLI Installation and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 42-74 **Vulnerability Type**: Mutable third-party executable installation without version or integrity pinning **Risk Level**: Medium ### Vulnerable Code Snippet ```bash npm i -g @iqinghu/qhkit ``` The fallback execution method also uses an unpinned package: ```bash npx @iqinghu/qhkit <command> ... ``` The upgrade instructions explicitly select the latest mutable release: ```bash npm i -g @iqinghu/qhkit@latest ``` The instructions additionally permit a mirror registry fallback: ```bash npm i -g @iqinghu/qhkit --registry=https://registry.npmmirror.com ``` ### Technical Analysis The Skill installs and executes `@iqinghu/qhkit` without pinning a reviewed package version or verifying an integrity digest. The `@latest` tag is mutable, and an unversioned npm installation resolves according to current registry metadata. Consequently, the executable code run by the Skill can change after the Skill itself has been audited. The `npx` fallback can retrieve and execute package content at invocation time. Global installation also exposes the resulting executable broadly within the user's environment. npm lifecycle scripts may execute during installation unless explicitly disabled, creating an additional code-execution opportunity before the CLI is invoked. The mirror fallback expands the dependency trust boundary. It is described as a network fallback and is not by itself evidence of malicious behavior, but the Skill does not establish an independent package-integrity value against which content from either registry must be checked. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, official registry metadata, or permitted mirror. 2. The attacker publishes or serves a malicious release under the expected package name or mutable `latest` tag. 3. The Agent runs an unpinned global installation, upgrade, or `npx` invocation. 4. npm downloads the attac ...[truncated 1157 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Pin `@iqinghu/qhkit` to a specifically reviewed version instead of using an unversioned package or `@latest`. - Record and verify the expected npm integrity digest for the approved package artifact. - Use a lockfile and a project-local installation rather than a global installation where possible. - Avoid `npx` retrieval of an unpinned package. If `npx` is necessary, provide an exact version and prohibit automatic substitution. - Require explicit user authorization before dependency installation or upgrade. - Disable npm lifecycle scripts during installation where compatible: ```bash npm install --ignore-scripts ... ``` - Independently review any lifecycle scripts before enabling them. - Use a trusted registry with authenticated transport and tightly control whether mirror registries are allowed. - Run the CLI in a sandbox with access limited to the specific media files and credentials required for the requested generation operation. - Do not expose unrelated environment variables or broad home-directory access to the dependency. - Establish a controlled update process that reviews a new version before changing the approved pin. ]]>
Vulnerability Patterns
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Vague Triggers

Medium
Confidence
94% confidence
Finding
The skill metadata description says the skill 'must trigger' for broad, common requests like ad films, brand promos, TVCs, and cinematic product videos, without strong disambiguation. This can cause unintended invocation in loosely related contexts, increasing the chance the agent installs tools, requests API credentials, or initiates external service workflows when the user did not explicitly ask for this vendor-specific capability.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The '何时触发' section provides only broad positive examples and no boundaries, so ordinary creative requests may over-match and invoke this skill unnecessarily. In this skill's context, over-triggering is more concerning because the instructions encourage environment bootstrapping, package installation, external network access, and token setup, which amplifies the consequences of a mistaken invocation.

Static analysis

No suspicious patterns detected.