Back to skill

Security audit

电商详情页复刻 | 详情页模仿 | 高转化设计 | 竞品详情 | 青虎AI

Security checks for vulnerabilities and agentic risk

Overview

The skill’s image-generation purpose is coherent, but it should be reviewed because it tells agents to automatically modify the host environment with an unpinned global third-party CLI and persistent token setup.

Install only if you trust the qhkit npm package and its registry sources. Prefer a pinned, user-local or platform-managed install, approve any Node/npm installation yourself, use a scoped API token, and run generation with access only to the images needed for the task.

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:39
Finding
Unpinned Global Installation of a Third-Party CLI## Vulnerability Details **File Location**: `SKILL.md`, lines 39 and 68 **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium ### Vulnerable Code At line 39: ```bash npm i -g @iqinghu/qhkit ``` At line 68: ```bash npm i -g @iqinghu/qhkit@latest ``` ### Technical Analysis The skill instructs the agent to install `@iqinghu/qhkit` globally without pinning it to an audited version. The upgrade procedure explicitly selects the mutable `latest` release. Consequently, the code installed and executed can change after this skill has been reviewed. An npm installation may execute package lifecycle scripts, including installation hooks. If the package, a transitive dependency, its publisher account, the npm registry path, or the recommended fallback mirror is compromised, arbitrary code could run during installation. A global installation also places executable files in a shared command location and affects future sessions, exceeding the minimum scope needed for a single image-generation task. The document avoids requiring root and offers `npx` after permission failure, which limits system-wide privilege escalation, but the default remains a persistent account-wide installation. The dependency is consistent with the skill's declared functionality and is not shown to be malicious. The vulnerability is the mutable, globally installed supply-chain dependency rather than evidence of intentional malicious behavior. The separately flagged checksum command is not a `curl | bash` execution: ```bash cd /tmp && curl -fsSL https://nodejs.org/dist/v22.22.3/SHASUMS256.txt | grep ' node-v22.22.3-linux-x64.tar.xz$' | sha256sum -c - ``` It pipes a checksum manifest through filtering and verification, not into a shell interpreter. The accompanying instructions require successful verification before extraction, so that command is not treated as a confirmed vulnerability. ### Attack P ...[truncated 1396 chars]
Remediation
## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to a specifically reviewed version rather than resolving the mutable latest release: ```bash npm install --prefix "$HOME/.local/qhkit" @iqinghu/qhkit@REVIEWED_VERSION ``` 2. Prefer a project-local or dedicated user-local installation over `npm -g`, and invoke the exact installed binary. This limits changes to shared command paths and simplifies removal. 3. Record and verify the package archive's expected integrity hash or signature through a trusted, independently maintained manifest. 4. Audit the selected release, its transitive dependency tree, and all npm lifecycle scripts before allowing installation. 5. Use `--ignore-scripts` when the reviewed package can operate without lifecycle scripts. If scripts are required, document and validate each required script rather than enabling all hooks implicitly. 6. Replace automatic `@latest` upgrades with an explicit version allowlist. Review and approve a new version before changing the pinned value. 7. Do not execute upgrade commands supplied dynamically in remote error messages without validating them against the allowlist. 8. Avoid silently switching registries. If a mirror is required, treat it as an additional trust boundary and verify downloaded package integrity against independently trusted metadata. 9. Run installation and image generation in a restricted account or sandbox with access only to required input and output files. Do not expose unrelated credentials or directories. 10. Never recommend elevated installation as a workaround for global-install permission failures.
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 (1)

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill goes beyond describing how to use an image-generation capability and instructs the agent to bootstrap the host environment by installing Node, installing a global npm package, configuring API credentials, and retrying with alternate registries. That expands the skill's power from content generation into host modification and secret handling, creating supply-chain and credential-exposure risk if an agent follows it automatically.

Static analysis

No suspicious patterns detected.