Back to skill

Security audit

小红书 爆款视频生成 | LinkPix

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent video-generation purpose, but it asks the agent to install mutable third-party tools and handle a reusable API key, so it belongs in Review before installation.

Install only if you are comfortable with the agent changing your local toolchain and handling Qinghu API credentials. Prefer a disposable or contained environment, configure the API key out of band if possible, use a limited token with spending controls, and be aware that selected local media will be uploaded for generation and paid jobs require explicit confirmation in the skill flow.

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:47
Finding
Unpinned Third-Party Packages Are Installed and Executed Automatically## Vulnerability Details **File Location**: `SKILL.md`, lines 47-88 **Vulnerability Type**: Supply-chain exposure through unpinned executable dependencies **Risk Level**: High ### Evidence ```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 original-image -o compressed-image.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 or execute third-party packages without pinning reviewed versions or verifying package integrity. In particular, `@latest` deliberately resolves to mutable code published after the Skill was audited, while `npx --yes` downloads and executes a package without an interactive confirmation step. Global npm installation increases the impact because the installed binary remains available outside the current task and may replace an existing command with the same name. npm installation can also execute package lifecycle scripts. A compromised publisher account, malicious future release, dependency confusion event, or compromised registry mirror could therefore cause arbitrary code execution under the Agent's operating-system account. The Node.js bootstrap command separately identified by the pre-scan is not itself a `curl | bash` operation. It downloads a binary archive and verifies it using the official SHA-256 manifest before extraction. That checksum process is materially safer than direct remote-script execution. However, it does not mitigate the unpinned npm, pip, and npx dependency risks described here. ### Attack Path 1. An attacker compromises a package publisher, upstream dependency, package release, or configured registry mirror. 2. The attacker publishes a malicious version under one ...[truncated 1392 chars]
Remediation
## Remediation Suggestions 1. Pin every executable dependency to a reviewed exact version; do not use `@latest`. 2. Record and verify package integrity hashes or use a lockfile with integrity metadata. 3. Install dependencies in a dedicated, non-global project directory or disposable container. 4. Replace `npx --yes sharp-cli` with a locally installed, pinned dependency. 5. Require explicit user approval before installing or upgrading executable software. 6. Disable unnecessary npm lifecycle scripts where compatible, for example by using `--ignore-scripts`. 7. Prefer the canonical package registries. If mirrors are necessary, document their trust implications and verify fetched artifacts against independently obtained integrity values. 8. Run media-processing and API tools under a restricted account with access only to explicitly selected input and output files. 9. Avoid automatic upgrades in response to server or stderr messages. Present the exact proposed version and obtain approval before installing it.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:69
Finding
API Token Is Requested Through Chat and Passed as a Command-Line Argument## Vulnerability Details **File Location**: `SKILL.md`, line 69 **Vulnerability Type**: Insecure secret collection and command-line exposure **Risk Level**: Medium ### Evidence ```bash qhkit config set --token <API_KEY> --env prod ``` The surrounding instructions direct the user to generate an API key and send that key to the Agent. ### Technical Analysis API tokens are authentication secrets and should not be collected through ordinary conversational messages. Asking the user to send the token to the Agent may place it in conversation transcripts, telemetry, debugging records, or other retained application data. Passing the token through the `--token` command-line argument creates additional exposure. Depending on the execution environment, command arguments may be visible through process inspection, command logging, shell history, audit systems, exception reports, or Agent tool traces. The documentation mentions `QHKIT_TOKEN` as an alternative, but it does not establish a secure secret-entry process or ensure that the value is excluded from logs. Environment variables can also be exposed to child processes and diagnostic output if not carefully scoped. ### Attack Path 1. The user follows the Skill instructions and pastes an API token into the conversation. 2. The token is retained in chat history, telemetry, logs, or an Agent execution trace. 3. The Agent constructs a command containing the plaintext token as an argument. 4. The command or process arguments are recorded in shell history, process monitoring, audit logs, or error output. 5. A party with access to any exposed record retrieves the token. 6. The party authenticates to the Qinghu service and performs actions permitted by that token, potentially including paid generation requests. ### Impact Assessment Exploitation is limited to the permissions associated with the disclosed API token; it does not directly provide operating-system privilege es ...[truncated 636 chars]
Remediation
## Remediation Suggestions 1. Remove the instruction asking users to send API keys through chat. 2. Require users to configure the token themselves through a secure local interface. 3. Use hidden terminal input, an operating-system credential store, or a secret manager. 4. Prefer standard input or a protected configuration file over command-line arguments. 5. If a configuration file is used, create it with owner-only permissions such as mode `0600`. 6. Scope environment variables only to the required process and prevent them from being inherited by unrelated child processes. 7. Explicitly redact tokens from stdout, stderr, tool traces, diagnostics, and exception messages. 8. Document token revocation and rotation procedures. 9. Recommend a least-privilege API token with spending limits and only the permissions needed for video-generation operations.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (3)

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The skill instructs the agent to bootstrap a local runtime by downloading Node, modifying PATH, and globally installing an npm package in order to perform a video-generation task. That materially expands the agent's authority from using an existing tool to changing the host environment and executing newly fetched code, which creates supply-chain and environment-integrity risk beyond what is necessary for the stated purpose.

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The skill explicitly tells the agent to ask the user for an API key and then set it in the CLI, causing the agent to collect and handle reusable credentials. For a video-generation skill, direct credential collection is unnecessary and dangerous because it exposes secrets to the agent context, logs, and downstream tooling, and could enable unauthorized use if mishandled.

Context-Inappropriate Capability

Medium
Confidence
89% confidence
Finding
The skill directs the agent to install Pillow or sharp and transform local files to work around upload-size limits. This broadens the skill from video generation into arbitrary local file processing and additional package execution, increasing attack surface and creating unnecessary risk around user files and dependency installation.

Static analysis

No suspicious patterns detected.