Back to skill

Security audit

Vidu Q3 电商带货视频 | LinkPix

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but it asks for a live API key in chat and directs broad unpinned package installs that users should review before installing.

Install only if you are comfortable with qhkit and related tools being installed or upgraded on your machine. Configure any API key through a private environment variable or secret store instead of pasting it into chat, and prefer pinned or platform-managed dependencies where possible.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T08 · Insecure Dependencies

Error
Location
SKILL.md:51
Finding
Unpinned Third-Party Packages Are Installed and Executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 51–90 **Vulnerability Type**: Supply-chain exposure through mutable third-party dependencies **Risk Level**: High ### Vulnerable Code ```bash npm i -g @iqinghu/qhkit ``` ```bash npm i -g @iqinghu/qhkit@latest ``` ```text pip install pillow -i https://pypi.tuna.tsinghua.edu.cn/simple ``` ```bash npx --yes sharp-cli -i 原图 -o 压缩后.jpg resize 2048 ``` The instructions also permit npm installation through an alternate registry: ```bash --registry=https://registry.npmmirror.com ``` ### Technical Analysis The Skill directs the Agent to install and execute dependencies without pinning exact versions or verifying package integrity. In particular: - `@iqinghu/qhkit` is installed without a version at line 51. - The upgrade instruction explicitly installs the mutable `@latest` release at line 77. - Pillow is installed without a fixed version and through a third-party Python package mirror. - `npx --yes sharp-cli` automatically downloads and executes the currently resolved package without interactive confirmation. - Global npm installation modifies the user's executable environment rather than using an isolated, task-specific environment. The effective code executed by these commands can change after the Skill has been reviewed. A compromised maintainer account, package release, registry, mirror, or dependency can therefore introduce arbitrary code into the Agent environment. The dependencies are relevant to the declared video-generation and image-resizing functionality, but automatic, unpinned installation exceeds the minimum safe dependency-management behavior. Image resizing could instead use an already installed tool or an isolated, pinned dependency. The primary CLI should likewise be installed at a reviewed version. ### Attack Path 1. An attacker compromises a package maintainer account, package registry, mirror, or transitive dependency. 2. The attacker publishes a malicious version ...[truncated 1225 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every dependency to an exact reviewed version, including `@iqinghu/qhkit`, Pillow, and `sharp-cli`. 2. Remove `@latest` and avoid unversioned `npx --yes` execution. 3. Verify downloaded packages using lockfiles, npm integrity metadata, hashes, or signed provenance. 4. Prefer project-local installation in an isolated directory or container instead of global npm installation. 5. Require explicit user approval before installing or upgrading executable dependencies. 6. Use the official package registry by default. If mirrors are permitted, document their trust model and apply the same integrity verification. 7. Disable or review npm lifecycle scripts where feasible. 8. Prefer already installed image-processing tools. If installation is unavoidable, use an isolated virtual environment and a pinned, hash-verified requirements file. 9. Define a reviewed minimum and maximum supported CLI version rather than automatically following the newest release. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:66
Finding
API Credential Is Requested Through the Conversation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 66–70 **Vulnerability Type**: Insecure handling of sensitive authentication data **Risk Level**: Medium ### Vulnerable Code ```text 4. **密钥**:无密钥时(命令返回 `stage:"config"`),把下面的引导文案发给用户,拿到密钥后执行 `qhkit config set --token <密钥> --env prod`(或设环境变量 `QHKIT_TOKEN`): > 1. 打开 https://www.iqinghu.com/workbench/login?type=1&urlCode=1788417429126 注册/登录 > 2. 进入控制台 → 工作台的 APIKeys 页面:https://www.iqinghu.com/workbench/dashboard/api-keys > 3. 点「创建/复制」生成密钥,生成后将 API 密钥发我 ``` This passage directs the user to send the generated API key to the Agent and then places the key directly in a command-line argument: ```bash qhkit config set --token <密钥> --env prod ``` ### Technical Analysis Authentication is necessary for the declared cloud video-generation functionality. However, asking the user to paste an API key into the conversation is not the minimum-safe authentication method. A credential disclosed in a conversation can be retained in chat history, application telemetry, model context, audit logs, support exports, or other intermediary systems. Placing the credential directly in a command-line argument may additionally expose it through shell history, process inspection, command logging, or error reporting. The document mentions `QHKIT_TOKEN` as an alternative, but still explicitly instructs the Agent to ask the user to send the secret. It also does not define redaction, retention, rotation, scope, or revocation requirements. ### Attack Path 1. The Agent tells the user to generate and send an API key. 2. The user pastes the live credential into the conversation. 3. The credential is retained in conversation history, logs, telemetry, or Agent context. 4. Alternatively, the Agent inserts the key into a command-line argument that is recorded in shell history or process-monitoring data. 5. A party or component with access to those records obtains the credential. 6. The exposed key is used to access ...[truncated 676 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the instruction asking users to send API keys through the conversation. 2. Require users to configure the credential privately, such as by setting `QHKIT_TOKEN` in their local secret manager or terminal. 3. Prefer reading the credential from standard input or a protected credential store rather than passing it as a command-line argument. 4. Ensure the Agent never echoes, logs, summarizes, or persists the token. 5. Add automatic redaction for token-shaped values in command output, errors, and diagnostic logs. 6. Recommend scoped, revocable, and short-lived credentials where supported. 7. Document immediate revocation and rotation procedures for accidentally disclosed credentials. 8. Ensure any credential configuration file is created with restrictive user-only permissions. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill directs the agent to install Node.js and globally install or upgrade the qhkit CLI, expanding from a narrow video-generation task into general environment modification. This increases attack surface and persistence on the host, and if the package source, version, or network path is compromised, the agent could be induced to execute untrusted code during install or upgrade.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The skill instructs the agent to perform local image compression and, if needed, install extra Python or Node packages such as Pillow or sharp-cli to do so. That gives the skill secondary software-installation and local file-processing behavior beyond its stated purpose, creating additional code execution and supply-chain risk on the host.

Ssd 3

Medium
Confidence
98% confidence
Finding
The skill explicitly tells the agent to ask the user to paste an API key into chat and then use it for configuration. Collecting credentials through the conversation channel is unsafe because chat transcripts may be retained, logged, exposed to other tools, or mishandled by downstream systems, turning a normal setup flow into a secret-handling vulnerability.

Static analysis

No suspicious patterns detected.