Back to skill

Security audit

电商图裂变 | 图片裂变 | 多版本生成 | 广告素材裂变 | 青虎AI

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but it needs review because it directs agents to install and upgrade an unpinned global CLI and persist an API token.

Install only if you are comfortable letting the agent install or run the qhkit npm package, upload selected product images to Qinghu AI, and use a Qinghu API token/credits. Prefer approving installation explicitly, using a pinned reviewed qhkit version, and providing the token through a temporary protected secret rather than a persistent config file.

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

Warning
Location
SKILL.md:45
Finding
Unpinned Third-Party CLI Installation and Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 45–48 and line 66 **Vulnerability Type**: Unpinned dependency installation and execution **Risk Level**: Medium ### Vulnerable Code ```bash npm i -g @iqinghu/qhkit ``` ```bash npx @iqinghu/qhkit <command> ... ``` ```bash npm i -g @iqinghu/qhkit@latest ``` ### Technical Analysis The Skill directs the Agent to download and execute `@iqinghu/qhkit` without pinning it to a reviewed version or verifying package integrity. The `npx` fallback can retrieve and immediately execute the registry's current package version. The explicit `@latest` upgrade instruction likewise allows future, unaudited package contents to replace the installed implementation. npm package installation may execute package lifecycle scripts, while subsequent CLI invocation executes the installed package with the privileges of the invoking user. Therefore, compromise of the package publisher, npm registry account, configured mirror, or a future package release could turn this documented installation process into arbitrary local code execution. The global installation is broader than necessary for a single Skill. It modifies the user's shared tool environment and may affect other sessions or projects. The instructions do not require root access, and thus no privilege escalation is confirmed; however, the package receives all permissions already held by the invoking user. The separate Node.js bootstrap at lines 53–55 is not a `curl | bash` flow. It downloads a versioned archive and verifies it with the corresponding SHA-256 manifest before extraction, so it is not the confirmed issue reported here. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, registry delivery path, or fallback mirror used for `@iqinghu/qhkit`. 2. The attacker publishes a malicious package version under the legitimate package name or alters a future release. 3. Th ...[truncated 1271 chars]
Remediation
## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to a specific version that has been independently reviewed instead of using an unqualified package name or `@latest`. 2. Record and verify the expected npm package integrity hash before installation. 3. Remove automatic `@latest` upgrades. Require review and integrity updates before accepting a new release. 4. Avoid `npx` behavior that implicitly downloads current registry content. If `npx` remains necessary, specify an exact reviewed version and require explicit user approval before retrieval. 5. Prefer a project-local or isolated installation over `npm i -g`, such as a dedicated container or restricted execution environment. 6. Run the CLI with minimum filesystem and network access, exposing only the selected image files and required service endpoint. 7. Provide the token through a scoped environment variable or protected credential mechanism rather than command-line arguments, and ensure it is not exposed to logs. 8. Pin the registry endpoint and document its trust assumptions. Do not silently switch to a mirror without user approval and equivalent integrity verification. 9. Disable npm lifecycle scripts during installation where compatible, or explicitly audit all required lifecycle scripts before permitting them.
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill instructs the agent to bootstrap and install Node.js and the qhkit CLI on the host, including downloading binaries and modifying PATH. That exceeds the narrow task of image variation generation and creates unnecessary supply-chain and host-modification risk, especially if performed automatically on a user or shared system.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
The skill directs the agent to persist an API token via qhkit config set or environment variables, which can store credentials on disk or in process environments beyond the immediate task. Persistent credential handling increases the chance of secret leakage, reuse across sessions, or unauthorized use if the host is shared or compromised.

Vague Triggers

Medium
Confidence
87% confidence
Finding
The skill states it 'must trigger' for broad, common requests about generating multiple image versions, which can cause over-invocation of a tool that may install software, use paid APIs, and process user images. Overly broad mandatory triggering reduces user control and can lead to unnecessary external data sharing and unintended charges.

Static analysis

No suspicious patterns detected.