Back to skill

Security audit

AI电商视频广告 | 视频广告素材 | 信息流广告 | 广告视频生成 | 青虎AI

Security checks for vulnerabilities and agentic risk

Overview

The skill’s purpose is coherent, but it should be reviewed because it directs agents to install and run a mutable external CLI and may upload user media or spend service credits after broad ad-video triggers.

Install only if you specifically want Qinghu qhkit-based ad video generation. Confirm the exact package version and registry before installing or upgrading, avoid running npm with elevated privileges, provide only the media files needed for the task, and require an estimate plus explicit approval before any generation that may spend credits.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Error
Location
SKILL.md:43
Finding
Unpinned Third-Party CLI Installation and Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 43–46 and line 64 **Vulnerability Type**: Unpinned and mutable third-party dependency execution **Risk Level**: High ### Vulnerable Code ```bash npm i -g @iqinghu/qhkit ``` ```bash npx @iqinghu/qhkit <command> ... ``` ```bash npm i -g @iqinghu/qhkit@latest ``` The instructions also permit use of the alternate registry: ```bash --registry=https://registry.npmmirror.com ``` ### Technical Analysis The Skill directs the Agent to install and execute `@iqinghu/qhkit` without pinning an audited version or verifying package integrity. The `@latest` upgrade instruction explicitly resolves to a mutable release. The `npx` fallback can download and immediately execute the package without a persistent, reviewable installation. npm installation may execute package lifecycle scripts in addition to installing the CLI. Consequently, compromise of the package publisher, npm account, registry infrastructure, or a future package release could result in arbitrary code execution. Using a mirror introduces an additional supply-chain trust boundary. Global installation is broader than necessary for invoking a single Skill. Although the instructions recommend avoiding privilege elevation when global installation fails, any global installation performed from a privileged npm environment would run installation logic with those elevated privileges. ### Attack Path 1. An attacker compromises the package publisher account, upstream package, release process, or configured registry. 2. The attacker publishes a malicious release under the legitimate `@iqinghu/qhkit` package name. 3. The Agent follows the Skill instructions and resolves the unpinned package or `@latest` release. 4. npm lifecycle scripts or the downloaded CLI execute malicious code during installation or invocation. 5. The malicious code accesses resources available to the invoking account, potenti ...[truncated 1218 chars]
Remediation
## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to a specific, reviewed version rather than using an unqualified package name or `@latest`. 2. Record and verify the expected npm integrity value for the approved package artifact. 3. Replace automatic upgrades with a controlled process that reviews release provenance, changelogs, package contents, and integrity before deployment. 4. Prefer a project-local installation with a committed lockfile over global installation. 5. Avoid `npx` auto-download behavior. If it must be used, specify an exact version and prevent fallback to another package version. 6. Use the primary npm registry unless the alternate mirror has been explicitly approved. Apply equivalent integrity validation regardless of registry. 7. Consider installation with lifecycle scripts disabled where compatible: ```bash npm install --ignore-scripts --save-exact @iqinghu/qhkit@<reviewed-version> ``` If lifecycle scripts are required, review them before installation. 8. Run the CLI in a restricted environment with access only to the media files needed for the requested operation. Do not expose unrelated files, credentials, or environment variables. 9. Require explicit user approval before installing or upgrading the dependency, and clearly identify the version, registry, and expected privileges. 10. Never run the installation with administrative privileges unless independently justified and approved.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (2)

Vague Triggers

Medium
Confidence
91% confidence
Finding
The metadata description says ad-video related requests 'must trigger', using broad keywords such as advertising videos, social media materials, and platform names. This can cause the skill to activate on loosely related user requests and push execution toward external CLI installation and paid generation flows without sufficient narrowing or confirmation.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The 'when to trigger' section provides only broad examples like preparing ad video assets, but does not define boundaries or cases where the skill should not run. In context, this is more dangerous because the skill includes environment bootstrapping, package installation, credential setup, and billing-related generation steps, so accidental invocation can lead to unnecessary external actions or user cost.

Static analysis

No suspicious patterns detected.