Back to skill

Security audit

YouTube 爆款视频生成 | LinkPix

Security checks for vulnerabilities and agentic risk

Overview

The skill’s video-generation purpose is coherent, but it asks for an API key through chat and directs unpinned tool installs and upgrades that can change the user environment.

Review this skill before installing. Use a limited Qinghu API key, avoid pasting long-lived secrets into chat when a secure secret manager is available, and prefer a sandbox or pinned local environment for qhkit and image tools instead of global mutable installs.

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

Warning
Location
SKILL.md:47
Finding
Unpinned Third-Party Packages Are Installed and Executed Automatically<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:47`, `SKILL.md:70-74`, and `SKILL.md:86` **Vulnerability Type**: Supply-chain exposure through unpinned package installation **Risk Level**: Medium ### Vulnerable Code ```bash npm i -g @iqinghu/qhkit ``` ```bash npx @iqinghu/qhkit <command> ... ``` ```bash npm i -g @iqinghu/qhkit@latest ``` ```bash pip install pillow -i https://pypi.tuna.tsinghua.edu.cn/simple npx --yes sharp-cli -i <input-image> -o <output-image>.jpg resize 2048 ``` The instructions also permit npm mirror fallback through: ```bash --registry=https://registry.npmmirror.com ``` ### Technical Analysis The Skill directs the agent to install and execute third-party packages without pinning exact versions or verifying package integrity. In particular, `@latest` deliberately resolves to mutable package content, while `npx` can download and immediately execute a package that was not present during the Skill audit. npm packages can run executable entry points and installation lifecycle scripts with the permissions of the invoking account. Python packages installed with `pip` can similarly execute build or installation logic. Consequently, the reviewed `SKILL.md` does not fully determine the code that will execute when the Skill is invoked. The use of third-party mirrors introduces additional registry trust. Although these mirrors may be legitimate availability fallbacks, the Skill provides no package hash, lockfile, signature, or provenance verification that would detect malicious or unexpectedly modified artifacts. Global installation exceeds the minimum access needed for an isolated video-generation operation because it changes the user's shared runtime environment rather than a Skill-specific environment. ### Attack Path 1. An attacker compromises a permitted package publisher account, package release, or registry/mirror delivery path. 2. The attacker publishes malicious package content under a version selected by an unpinn ...[truncated 1134 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every dependency to a reviewed exact version rather than using an implicit current release or `@latest`. 2. Commit and enforce a lockfile containing registry-resolved integrity values. 3. Verify package signatures, checksums, or trusted provenance attestations before installation. 4. Remove automatic upgrade instructions. Require explicit user approval and a separate review before changing versions. 5. Install dependencies in a Skill-specific, non-privileged environment rather than globally. 6. Avoid `npx` for implicit download-and-execute behavior. Install a pinned package first, verify it, and then invoke its local binary. 7. Pin Pillow and Sharp tooling to reviewed versions and use isolated Python virtual environments or local npm projects. 8. Prefer the primary package registry. If a mirror is required, document its trust model and verify downloaded artifacts against integrity data obtained through an independent trusted channel. 9. Run third-party media-processing and generation tools in a sandbox with restricted filesystem and network access. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:62
Finding
API Token Is Requested Through Chat and Passed in Process Arguments<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:62-67` **Vulnerability Type**: Insecure secret collection and command-line credential exposure **Risk Level**: Medium ### Vulnerable Code The Skill instructs the agent to obtain the user's API key and execute the equivalent of: ```bash qhkit config set --token <API_KEY> --env prod ``` It alternatively permits storing the key in: ```bash QHKIT_TOKEN ``` ### Technical Analysis The workflow explicitly asks the user to send an API key to the agent. Secrets submitted through a conversational interface may be retained in conversation history, agent traces, tool-call logs, observability systems, or support exports. Passing the token as a command-line argument creates an additional exposure channel. Depending on the operating system and execution environment, command arguments can appear in process listings, shell history, audit logs, terminal capture, and command-execution telemetry. An environment variable is preferable to a command argument in some environments, but it is not a complete secret-management control. Environment variables can be inherited by child processes and exposed through diagnostics, crash reports, or improperly protected process interfaces. The API credential is necessary for the declared remote video-generation functionality, but requesting it in chat and embedding it in a command argument are not the minimum-risk ways to provide that authorization. ### Attack Path 1. The Skill asks the user to copy an API token into the conversation. 2. The token is stored in chat history, agent telemetry, or tool execution records. 3. The agent passes the same token through the `--token` command-line argument, potentially creating further process, shell, or audit-log copies. 4. A person or process with access to one of those records retrieves the token. 5. The exposed token is used to authenticate to the Qinghu service. 6. The attacker submits API operations or consumes credits within t ...[truncated 611 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not ask users to paste API keys into ordinary chat messages. 2. Use the hosting platform's dedicated secret-entry interface or secret manager with masked input and access controls. 3. Pass the secret to `qhkit` through a protected file descriptor, standard input, keychain integration, or another non-command-line mechanism supported by the CLI. 4. If a configuration file is necessary, write it with restrictive user-only permissions and ensure the CLI never prints the complete token. 5. Avoid placing secrets in shell history, process arguments, generated parameter files, debugging output, or task logs. 6. Limit the token to the minimum API permissions and spending allowance necessary for video generation. 7. Document token expiration and rotation procedures. Advise immediate revocation if a token has already been posted in chat. 8. Ensure telemetry and error-reporting systems redact token-shaped values from commands, environment variables, and configuration output. ]]>
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 (4)

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The skill instructs the agent to install or upgrade Node and qhkit, including fetching binaries and npm packages from the network, as part of routine task handling. This expands the agent's execution surface and can lead to unreviewed software changes, supply-chain exposure, and persistence-altering actions on the host that are unrelated to answering the user's request.

Context-Inappropriate Capability

Medium
Confidence
98% confidence
Finding
The skill directs the agent to ask the user to paste an API key into chat and then store it via CLI config or environment variables. Requesting secrets through chat and writing them into local configuration increases the chance of credential disclosure in logs, transcripts, shell history, or reuse by unrelated processes.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
The skill tells the agent to install extra tooling such as Pillow or sharp-cli and to locally transform user-supplied files before retrying. This combines dependency installation with processing untrusted files, increasing attack surface through package supply chain risk and parser/library vulnerabilities in image handling.

Ssd 3

Medium
Confidence
99% confidence
Finding
The skill explicitly instructs the agent to solicit an API key from the user in chat and then configure it locally. In the context of an agent skill, this is especially dangerous because chat transcripts, tool logs, and persisted config can all expose the credential, enabling unauthorized use of the user's account or API balance.

Static analysis

No suspicious patterns detected.