Back to skill

Security audit

抖音 爆款视频生成 | LinkPix

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent video-generation purpose, but it tells the agent to install mutable third-party tools and collect an API key through chat, which users should review carefully before installing.

Install only if you are comfortable with qhkit/LinkPix handling your uploaded media and consuming account credits. Configure the API key outside chat if possible, use a narrowly scoped key with spending limits, and prefer a preinstalled or pinned qhkit version rather than letting the skill install or upgrade packages automatically.

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:48
Finding
Unpinned Third-Party Packages Are Downloaded and Executed at Runtime<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 48–87 **Vulnerability Type**: Unpinned and automatically executed third-party dependencies **Risk Level**: High ### Vulnerable Code Snippet ```bash npm i -g @iqinghu/qhkit ``` ```bash npm i -g @iqinghu/qhkit@latest ``` ```bash pip install pillow -i https://pypi.tuna.tsinghua.edu.cn/simple ``` ```bash npx --yes sharp-cli -i source-image -o compressed-image.jpg resize 2048 ``` ### Technical Analysis The Skill directs the Agent to download and execute third-party packages that are not included in, pinned by, or verifiable from the audited project. The primary `qhkit` dependency is installed globally without an exact version. The upgrade instruction explicitly installs `@latest`, allowing the code executed by the Agent to change after this Skill has been reviewed. The image-processing fallback similarly installs Pillow from an alternate package index or uses `npx --yes` to download and immediately execute `sharp-cli`. This creates a time-of-check/time-of-use supply-chain gap. Static review of `SKILL.md` cannot establish the safety of package versions that will be selected later. Global installation also has a broader effect on the host than a local, isolated installation and is not the minimum privilege or scope necessary for a single Skill invocation. The Node.js checksum command at line 57 is not a `curl | bash` execution chain. It pipes an official checksum manifest through `grep` into `sha256sum -c`, and the instructions require successful verification before extraction. That particular pipeline is a security control rather than direct remote script execution. It does not, however, address the separate risk from subsequently installing unpinned npm and Python packages. ### Attack Path 1. An attacker compromises a maintainer account, an upstream package, a transitive dependency, or one of the configured package registries. 2. The attacker publishes a malicious release under a pack ...[truncated 1408 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every dependency to an exact, reviewed version. Do not use implicit latest versions or `@latest`. 2. Record and verify package integrity hashes or distribute a lockfile produced from reviewed dependencies. 3. Replace global npm installation with a project-local installation in an isolated working directory. 4. Avoid `npx --yes`, which downloads and immediately executes mutable remote content. 5. Preinstall reviewed image-processing dependencies in a controlled runtime image instead of installing them during Skill execution. 6. Prefer official registries. If mirrors are necessary, document their trust model and require integrity verification independent of the mirror. 7. Disable or tightly control dependency lifecycle scripts where operationally possible. 8. Run external tooling in a sandbox with restricted filesystem access, a minimal environment, and limited outbound network access. 9. Replace automatic upgrades with an explicit administrator-controlled review and deployment process. 10. Do not recommend privilege elevation when global installation fails; retain the existing non-root principle and use an isolated local installation instead. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:63
Finding
Production API Key Is Requested Through Conversational Context and Passed as a Command Argument<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 63–68 **Vulnerability Type**: Insecure credential collection and command-line secret exposure **Risk Level**: Medium ### Vulnerable Code Snippet ```bash qhkit config set --token <API_KEY> --env prod ``` The accompanying instruction directs the user to generate or copy the API key and send that key to the Agent. ### Technical Analysis The Skill instructs the user to disclose a production API key through the conversation. Secrets placed in conversational context may be retained in chat history, telemetry, debugging records, model context, screenshots, or other logs outside the intended credential boundary. The suggested command also places the secret directly in a command-line argument. Depending on the host and shell configuration, command arguments may be exposed through shell history, process inspection, execution logs, audit systems, or error reporting. Although the Skill also mentions the `QHKIT_TOKEN` environment variable, it does not make secure user-side configuration the required path. Environment variables can also leak if broadly inherited or logged, so a dedicated credential store or protected configuration mechanism is preferable. ### Attack Path 1. The Skill detects that no `qhkit` credential is configured. 2. It asks the user to create and send a production API key through the conversation. 3. The user pastes the key into chat. 4. The key becomes available to conversation history, logging, telemetry, or any component with access to the Agent's context. 5. The Agent may additionally execute the configuration command with the key as a visible command-line argument. 6. A party with access to those records, process arguments, or shell history retrieves the key. 7. The exposed key is used to access the associated API account and submit unauthorized paid operations. ### Impact Assessment The exposed credential may permit unauthorized use of the Qinghu/LinkPix API within the ...[truncated 602 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the instruction asking users to send API keys through chat. 2. Require users to configure the credential themselves through a protected local interface or approved secret manager. 3. Provide a configuration command that reads the secret from hidden interactive input or standard input rather than a command-line argument. 4. If an environment variable must be used, instruct the user to set it outside the conversation and ensure subprocess logs never print it. 5. Store credentials in a file with restrictive permissions or in the operating system's credential store. 6. Redact tokens from stdout, stderr, diagnostic output, telemetry, and exception messages. 7. Ensure child processes receive only the credentials they require, rather than inheriting the Agent's full environment. 8. Document token rotation and immediate revocation procedures for accidentally disclosed credentials. 9. Recommend narrowly scoped API keys with spending limits and only the permissions necessary for video-generation operations. ]]>
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 (7)

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill directs the agent to bootstrap the runtime by downloading/installing Node.js, globally installing npm packages, and modifying PATH on the host. That creates a supply-chain and host-integrity risk because a content-generation request can trigger system changes and execution of newly fetched code, far beyond the minimum needed to fulfill a user request.

Context-Inappropriate Capability

Medium
Confidence
99% confidence
Finding
The skill tells the agent to ask the user to send an API key in chat and then configure it locally. Requesting raw credentials through the conversation channel exposes secrets to logs, transcripts, and downstream tooling, and can lead to credential theft or misuse.

Context-Inappropriate Capability

Low
Confidence
88% confidence
Finding
The skill instructs the agent to run local image-processing commands and, if dependencies are missing, install Python/Node packages on demand. Even though the goal is benign, this still expands execution scope and introduces additional package-fetch and code-execution paths from an ordinary media request.

Vague Triggers

Medium
Confidence
83% confidence
Finding
The skill says requests for Douyin viral/ad video generation 'must trigger,' creating an overly broad mandatory invocation rule. Broad trigger language can cause the agent to route many ordinary creative requests into a high-privilege tool path involving installs, uploads, and external service calls without sufficient user confirmation.

Vague Triggers

Medium
Confidence
80% confidence
Finding
The trigger examples are broad and lack clear boundaries, so common requests about Douyin videos may invoke the skill even when the user did not ask for this vendor workflow. In this skill's context, that matters because invocation can lead to external uploads, billing, polling, and environment changes.

Missing User Warnings

High
Confidence
98% confidence
Finding
The skill asks the user to provide an API key directly but gives no warning that the credential is sensitive or that chat is an unsafe transport/storage channel. This normalizes insecure credential handling and materially increases the risk of secret exposure.

Ssd 3

Medium
Confidence
99% confidence
Finding
Instructing the agent to solicit an API key in chat for later configuration is a direct secret-handling flaw. Secrets shared this way can be retained in logs/history, exposed to operators or integrations, and reused to access the external service account.

Static analysis

No suspicious patterns detected.