Back to skill

Security audit

模特图去AI感 | 超写实 | 高清超分 | 质感修复 | LinkPix

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for paid model-photo enhancement, but it needs review because it installs a mutable third-party CLI that handles API tokens and uploads user images.

Review this before installing if you are uncomfortable with a third-party npm CLI, global installation, persistent API-token configuration, or uploading model photos to Qinghu/LinkPix. Use it only for authorized portrait/model images, confirm the estimate before generation, and prefer a pinned, reviewed CLI version if available.

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:62
Finding
Unpinned Third-Party CLI Installation and Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 62–94 **Vulnerability Type**: Unpinned executable dependency and unsafe automatic upgrade **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 instructs the agent to install a third-party npm package globally, permits `npx` to retrieve and execute the package dynamically, and explicitly recommends upgrading to the mutable `latest` release. No exact package version, lockfile, package integrity value, or reviewed source code is included in the project. Consequently, the effective executable code can change after this Skill has been audited. Global npm installation may also execute package lifecycle scripts. The alternative npm mirror mentioned in the surrounding instructions introduces an additional supply-chain trust boundary. This is particularly sensitive because the installed CLI receives an API token and local portrait paths, uploads user images, and communicates with a remote service. The artifact contains no CLI implementation, so its credential handling, upload behavior, filesystem access, and network destinations cannot be independently verified. The separately flagged checksum pipeline at line 76 is not a `curl | bash` execution chain. It pipes a remotely obtained checksum entry through `grep` and into `sha256sum -c`; the downloaded text is not interpreted as shell code. The Node archive is checked before extraction. The confirmed issue is therefore the mutable npm executable dependency, not direct shell execution of the checksum file. ### Attack Path 1. An attacker compromises the npm publisher account, package namespace, registry distribution channel, or configured fallback mirror for `@iqinghu/qhkit`. 2. The attacker publishes a modified package under the expected name or as the mutable ` ...[truncated 1438 chars]
Remediation
## Remediation Suggestions 1. Pin `@iqinghu/qhkit` to a specific reviewed version rather than using an unversioned package reference or `@latest`. 2. Commit a lockfile with a registry-provided integrity value, or independently publish and verify a cryptographic digest for the approved package artifact. 3. Remove automatic upgrade instructions. Require security review and integrity verification before changing the approved version. 4. Avoid implicit `npx` downloads. If `npx` remains necessary, specify an exact version and configure it to reject unexpected package installation. 5. Prefer a project-local installation over a global installation to reduce system-wide effects and improve reproducibility. 6. Review npm lifecycle scripts before installation and disable them with `--ignore-scripts` where the package does not legitimately require them. 7. Publish or vendor auditable CLI source code and document expected network destinations, image-upload behavior, configuration-file locations, and token handling. 8. Store the API token with restrictive filesystem permissions, avoid exposing it in command history, and use a narrowly scoped and revocable token where supported. 9. Require explicit user consent before uploading portraits, and document the external service's data retention and privacy policy. 10. If a fallback registry mirror is permitted, verify that the downloaded artifact has the same independently trusted digest as the reviewed package.
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 the skill 'must trigger' for several broad, common phrases like '要更真实的质感' and '要提亮肤色', which can overlap with ordinary image-editing requests that may be better handled by other tools or require user confirmation. This increases the chance of unintended invocation, causing the agent to route user content into a paid external workflow without sufficiently clear intent.

Vague Triggers

Medium
Confidence
87% confidence
Finding
The '何时触发' examples are short and ambiguous, such as '洗一下这张图' or '提亮肤色', without guardrails distinguishing model-photo realism repair from normal beautification or unrelated editing. In an agent setting, this can over-match everyday requests and lead to incorrect tool use, unnecessary charges, or privacy-impacting transfer of user images to the third-party service.

Static analysis

No suspicious patterns detected.