Back to skill

Security audit

Grok 电商带货视频 | LinkPix

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for generating e-commerce videos, but it asks users to share an API key in chat and can automatically install or upgrade unpinned tools on the host.

Review before installing. Use this only in an isolated or low-risk environment, avoid global unpinned installs where possible, and do not paste API keys into chat; configure the Qinghu token through a secure secret mechanism or out-of-band terminal flow. Expect selected product media and prompts to be uploaded to the external video service, and require explicit approval before any paid generation task is submitted.

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:51
Finding
Unpinned Third-Party Dependencies Are Installed and Executed at Runtime<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:51`, `SKILL.md:77`, and `SKILL.md:90` **Vulnerability Type**: Supply-chain exposure through mutable, unpinned dependencies **Risk Level**: Medium ### 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 npx --yes sharp-cli -i source-image -o compressed-image.jpg resize 2048 ``` ### Technical Analysis The Skill instructs the Agent to download and execute packages whose exact versions and integrity values are not pinned. The `@latest` specifier explicitly allows the executed implementation to change after the Skill has been audited. The unversioned `pip install pillow` and `npx --yes sharp-cli` commands similarly resolve mutable package versions at execution time. The global installation of `@iqinghu/qhkit` increases the affected scope relative to a project-local or isolated installation. Package lifecycle scripts and subsequently invoked package code execute with the privileges of the Agent's operating-system account. The use of third-party registry mirrors as fallbacks introduces additional distribution infrastructure that must be trusted. This is not evidence that the named packages are currently malicious. The vulnerability is that future package releases, compromised publisher accounts, registry compromise, or dependency substitution could cause unaudited code to execute automatically. ### Attack Path 1. An attacker compromises a package publisher, package release process, registry account, registry mirror, or transitive dependency. 2. The attacker publishes a malicious release that satisfies the unpinned package request or becomes the package's `latest` version. 3. The Agent follows the Skill instructions and runs `npm`, `pip`, or `npx`. 4. The package manager downloads the attacker-controlled release. 5. Installation lifecycle code or the requested executable runs w ...[truncated 972 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every dependency to a reviewed exact version rather than using an implicit current version or `@latest`. 2. Record and verify package integrity hashes. For npm packages, use a lockfile with integrity metadata and a reproducible installation command such as `npm ci`. 3. For Python dependencies, use a locked requirements file containing exact versions and hashes, and install with `pip --require-hashes`. 4. Avoid global installation. Install dependencies into a dedicated project directory, virtual environment, container, or other sandbox with only the required filesystem and network access. 5. Replace automatic `npx --yes` execution with a pinned, pre-reviewed dependency installed from the lockfile. 6. Verify package ownership and provenance before installation. Where supported, validate registry signatures, attestations, and published checksums. 7. Do not switch registries automatically. Require explicit user approval for mirror use and document the additional trust boundary. 8. Upgrade dependencies through a reviewed change process rather than automatically installing the newest release when an error occurs. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:66
Finding
API Key Is Requested Through Chat and Passed as a Command-Line Argument<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:66-69` **Vulnerability Type**: Insecure secret collection and command-line credential exposure **Risk Level**: Medium ### Vulnerable Code Snippet The relevant instructions, translated into English, state: ```text When no key is configured, ask the user to obtain the key and then run: qhkit config set --token <key> --env prod Alternatively, set: QHKIT_TOKEN After creating or copying the key, send the API key to me. ``` ### Technical Analysis The Skill explicitly asks the user to disclose an API key in the conversation. Secrets supplied through chat may be retained in conversation history, application telemetry, Agent traces, audit logs, support exports, or other systems that are not intended to serve as secret stores. The recommended `qhkit config set --token <key> --env prod` invocation also places the secret directly in a command-line argument. Depending on the operating system and shell environment, command-line values may be exposed through shell history, process listings, execution logs, terminal capture, or monitoring software. Using the `QHKIT_TOKEN` environment variable may avoid command-line exposure in some workflows, but environment variables can still be inherited by child processes or captured by diagnostic tooling. The Skill does not prescribe a protected secret-injection mechanism, redaction controls, restrictive storage permissions, or key rotation after accidental disclosure. ### Attack Path 1. The Agent follows the Skill and asks the user to send the Qinghu API key in chat. 2. The user posts the key in the conversation. 3. The key is retained in chat history, Agent logs, telemetry, or execution traces. 4. Alternatively, the Agent places the key in a command-line argument, exposing it through shell history, process inspection, or command logging. 5. A person or process with access to one of those records retrieves the key. 6. The exposed key is used to authenticate to the ...[truncated 725 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Never instruct users to paste API keys into the conversation. 2. Direct the user to configure the credential outside the Agent session through a masked terminal prompt, operating-system credential store, deployment secret manager, or platform-provided secret field. 3. Avoid passing secrets as command-line arguments. Modify or use the CLI so it can read the token from a masked interactive prompt, protected file descriptor, or secret-manager integration. 4. If an environment variable must be used, have the user set it directly outside the conversation and restrict its lifetime and inheritance. 5. Ensure configuration files containing tokens are created with restrictive permissions and are excluded from logs, backups, source control, and generated artifacts. 6. Redact token values from stdout, stderr, telemetry, command traces, and diagnostic output. 7. Document immediate revocation and rotation procedures for any key accidentally sent through chat or exposed in process history. 8. Apply least privilege to the service key, including restricted scopes, spending limits, and expiration where supported. ]]>
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 (4)

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The skill directs the agent to modify the host environment by installing Node.js, globally installing packages, and upgrading tooling. That expands the skill from invoking an existing video service into changing system state and pulling executable code from external package registries, which increases supply-chain and persistence risk if the package or mirror is compromised or if installation occurs on sensitive hosts.

Vague Triggers

Medium
Confidence
85% confidence
Finding
The description contains very broad activation keywords covering generic marketing, social media, and video-generation requests. This can cause the skill to trigger in contexts far beyond its narrow intended use, increasing the chance that the agent invokes external tooling, uploads user assets, or solicits credentials when the user did not specifically ask for this provider.

Vague Triggers

Medium
Confidence
82% confidence
Finding
The trigger section lists positive examples but provides no negative boundaries, so many ordinary 'make a product video' requests could activate the skill. In this skill's context, over-triggering is more dangerous because activation leads to external CLI usage, possible file uploads, polling, and even setup steps that alter the environment.

Ssd 3

High
Confidence
98% confidence
Finding
The skill explicitly tells the agent to ask the user to send an API key in chat and then use it for configuration. Collecting secrets through chat unnecessarily exposes credentials to the model, logs, transcripts, and anyone with access to conversation history; the danger is heightened because the key enables access to an external paid service and may allow unauthorized use or billing.

Static analysis

No suspicious patterns detected.