Back to skill

Security audit

Temu 商品图、主图套图、详情图、活动图生成 | LinkPix

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but it asks the agent to install mutable global tools and handle an API key in unsafe ways.

Install only if you are comfortable with this agent installing or upgrading third-party command-line packages and configuring a Qinghu API credential. Prefer configuring the API key through a private secret mechanism, avoid pasting it into chat, and use pinned, reviewed, local dependencies instead of global @latest installs where possible.

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

Error
Location
SKILL.md:54
Finding
Unpinned Third-Party Packages Are Installed and Executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:52-57`, `SKILL.md:78-80`, and `SKILL.md:93` **Vulnerability Type**: Supply-chain exposure through unpinned dependencies and mutable package versions **Risk Level**: High ### Vulnerable Code ```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 ``` The instructions also permit npm mirror use: ```bash --registry=https://registry.npmmirror.com ``` ### Technical Analysis The Skill directs the Agent to install and execute third-party packages without pinning exact versions or verifying package integrity. The core `@iqinghu/qhkit` dependency is initially installed without a version, while its upgrade procedure explicitly selects the mutable `latest` release. The fallback image-compression workflow similarly installs an unpinned Python package or executes an unpinned npm package through `npx --yes`. Package installation and `npx` execution can run package-controlled installation hooks and executable code. Consequently, the effective code executed by the Skill may change after the Skill itself has been reviewed. Use of third-party registry mirrors introduces additional infrastructure and synchronization trust boundaries. Global npm installation also changes the user's persistent tool environment rather than limiting the dependency to an isolated directory. This exceeds the minimum privilege and persistence footprint necessary to invoke an image-generation client, because a version-pinned, local, isolated installation would be sufficient. ### Attack Path 1. An attacker compromises a maintainer account, package release pipeline, registry, or configured mirror for one of the referenced packages. 2. The attacker publishes a malicious release under the expected package name or causes a mirror to distribute modified package content. 3. ...[truncated 1351 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every dependency to a reviewed exact version, for example: ```bash npm install --save-exact @iqinghu/qhkit@REVIEWED_VERSION python -m pip install pillow==REVIEWED_VERSION npx --yes sharp-cli@REVIEWED_VERSION ... ``` 2. Remove the instruction to install `@latest`. Require a Skill update and security review before changing dependency versions. 3. Use a lockfile with integrity metadata and require deterministic installation through `npm ci`. 4. Prefer a project-local installation or isolated temporary environment over `npm install -g`. 5. Verify package artifacts against publisher-provided cryptographic hashes or signatures before execution. 6. Restrict automatic package installation. If a dependency is absent, disclose the proposed package, version, source, and scope, then obtain user approval. 7. Avoid registry mirrors unless explicitly trusted by the user. If a mirror is necessary, apply the same integrity verification as for the primary registry. 8. Package reviewed image-compression functionality with the Skill or use an already installed system tool rather than dynamically executing an unpinned package. 9. Run dependency tooling in a sandbox with restricted filesystem access, a minimal environment, and network access limited to required endpoints. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:69
Finding
API Credential Is Requested Through Chat and Passed on the Command Line<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:69-74` **Vulnerability Type**: Insecure collection and handling of an API credential **Risk Level**: Medium ### Vulnerable Instruction and Code The Skill instructs the user to create or copy an API key and send that API key to the Agent. It then directs the Agent to configure the credential using: ```bash qhkit config set --token <API_KEY> --env prod ``` It alternatively permits use of the following environment variable: ```bash QHKIT_TOKEN ``` ### Technical Analysis Requesting a raw API key in the conversation unnecessarily places the credential in the Agent's transcript and active context. Depending on the hosting environment, conversation content may be retained in application logs, telemetry, backups, debugging records, or downstream integrations. Passing the key through the `--token` command-line argument creates another exposure channel. Command-line arguments may be visible to other local processes through process inspection while the command runs. They can also be retained in interactive shell history when manually executed. The API key is required for the declared remote image-generation functionality, but disclosure to the conversational channel is not required. The user can configure the credential privately through a protected secret store, non-echoing prompt, or restricted environment injection. Therefore, the documented handling exceeds the minimum credential exposure necessary for the Skill's functionality. ### Attack Path 1. The user follows the Skill's instruction and pastes the Qinghu API key into the conversation. 2. The credential is retained in the transcript, Agent context, logs, telemetry, or another connected system. 3. Alternatively, the key is supplied through the `--token` command-line argument and becomes visible through process inspection or shell history. 4. A party with access to one of those records or to the local account obtains the key. 5. The party auth ...[truncated 866 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the instruction asking the user to send the raw API key through chat. 2. Ask the user to configure the secret privately outside the conversation. 3. Prefer a non-echoing interactive prompt, operating-system credential store, or platform-provided secret manager. 4. If an environment variable is required, have the user inject it through the execution platform's protected secret mechanism rather than printing it in chat or embedding it in a generated command. 5. Avoid command-line token arguments because they may appear in process listings and shell history. 6. Ensure configuration files containing credentials are created with owner-only permissions. 7. Redact tokens from standard output, standard error, exception messages, diagnostic bundles, and telemetry. 8. Document a revocation and rotation procedure for credentials that have already been disclosed. 9. Use narrowly scoped, short-lived credentials where the service supports them. 10. Confirm that generated commands and Agent logs never reproduce the credential after configuration. ]]>
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 (3)

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The skill instructs the agent to install Node, install a CLI globally, download binaries, verify checksums, and modify PATH/environment state on the host. Those actions expand the skill from image-generation into system bootstrapping and package management, which increases attack surface and creates opportunities for unintended code execution or persistent environment changes if the package source, mirrors, or surrounding workflow are compromised.

Context-Inappropriate Capability

Medium
Confidence
97% confidence
Finding
The skill explicitly tells the agent to ask the user for an API key and then set it via command line or environment variable. This normalizes credential collection inside the conversation and creates a direct secret-handling path that can expose tokens through chat logs, shell history, process lists, or downstream tool telemetry.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
The skill directs the agent to perform local image recompression and, if needed, install Python packages or execute npx-based tooling to do so. That goes beyond the stated business purpose and introduces additional code-execution paths and package-supply-chain risk on the local system, especially because it may trigger ad hoc dependency installation during normal task handling.

Static analysis

No suspicious patterns detected.