Back to skill

Security audit

WeChat Mini Program → uni-app + Vue3 + TypeScript Conversion

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent WeChat Mini Program conversion guide with disclosed project reads and output writes; the main caution is its user-run, unpinned npm/npx post-conversion commands.

Before installing, confirm the agent will write only to a new or backed-up output directory. Treat the suggested npm install and npx command as separate manual steps: pin versions where possible and run them in a project/container that does not expose unrelated credentials.

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:750
Finding

Unpinned npm dependencies and remote package execution

Content
View full analysis
npm install npm install -D @dcloudio/types @types/node # Run in HBuilderX or with CLI: npx @dcloudio/uvm npm run dev:mp-weixin ``` ### Technical Analysis The Skill tells users to install dependencies and execute `@dcloudio/uvm` through `npx` without specifying reviewed versions, requiring a lockfile, or verifying package integrity. When the requested package is not already available locally, `npx` can retrieve it from the configured npm registry and immediately execute its entry point. The effective code can therefore change after the Skill has been audited. Similarly, unpinned `npm install` operations may resolve mutable direct or transitive dependency versions and execute package lifecycle scripts such as `preinstall`, `install`, or `postinstall`. This behavior is not required for the core source-conversion operation itself. Installation and execution should be an explicit, separately approved post-conversion step with reproducible dependency controls. ### Attack Path 1. A user follows the post-conversion commands documented by the Skill. 2. npm resolves the unpinned packages from the user's configured registry. 3. A compromised package release, maintainer account, registry response, transitive dependency, or unexpected future version supplies malicious code. 4. npm lifecycle scripts or the `npx @dcloudio/uvm` entry point execute that code under the user's account. 5. The executed code can access resources available to that account, including the converted project, local configuration, environment variables, npm credentials, SSH material, and other readable files. 6. The malicious code may alter generated output, steal accessible data, or establish additional execution mechanisms subject to the user's operating-s ...[truncated 962 chars]
Remediation
View remediation
``` 2. Generate and commit a reviewed `package-lock.json`, then use reproducible installation: ```bash npm ci ``` 3. Use `npm ci --ignore-scripts` where package lifecycle scripts are unnecessary. If scripts are required, review and explicitly allow them before execution. 4. Separate conversion from dependency installation. Ask for explicit user approval before performing any network-backed installation or package execution. 5. Verify package provenance, registry configuration, checksums, maintainers, and transitive dependencies before recommending a version. 6. Prefer executing a locally installed, lockfile-pinned binary rather than allowing `npx` to retrieve mutable code: ```bash npm install --save-dev --save-exact @dcloudio/uvm@ npm ci ./node_modules/.bin/uvm ``` 7. Run installation and build commands in an isolated container or restricted build account without access to unrelated credentials or sensitive host files. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 248)May include surrounding context.

vue
<template>
  <view class="page-foo">
    <!-- converted WXML content -->
  </view>
</template>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 437)May include surrounding context.

text

```vue
<!-- Target — TypeScript -->
<script setup lang="ts">
import { ref, watch, onMounted, onUnmounted, type Ref } from 'vue'

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger definition is broad enough to activate on loosely related requests such as analysis or code generation involving WeChat Mini Programs, not just explicit conversion tasks. Overbroad invocation increases the chance an agent will read, transform, or write project files in situations where the user did not clearly authorize a full migration workflow.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 300)May include surrounding context.

md
fetchData() {
    this.setData({ loading: true })
    wx.request({
      url: 'https://api.example.com/list',
      success: (res) => {
        this.setData({ list: res.data, loading: false })
      }

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 355)May include surrounding context.

md
fetchData() {
    this.setData({ loading: true })
    wx.request({
      url: 'https://api.example.com/list',
      success: (res) => {
        this.setData({ list: res.data, loading: false })
      }

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill directs writing a complete converted project to disk and repeatedly creating files, but it does not require an explicit confirmation step immediately before file creation or warn about overwrite behavior. In agent environments this can cause unintended modification of user workspaces, clobber existing files, or create large numbers of files unexpectedly.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The skill instructs running npx @dcloudio/uvm without pinning a specific version, which allows whatever package version is current at execution time to be fetched and run. In an agent or automated workflow, this creates a supply-chain risk because package updates or compromise could introduce unexpected code execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file documents wx.clearStorageSync() and wx.clearStorage() mappings to uni-app equivalents, which are destructive operations affecting user data. The surrounding documentation provides no warning that these calls remove stored application data, so a reader could apply them without noticing the impact.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The reference includes sensitive APIs such as getLocation(), chooseLocation(), getUserInfo(), getUserProfile(), authorize(), and openSetting() but does not mention consent, permissions, or privacy implications. For markdown files, omission of warnings about behaviors affecting user privacy is in scope for missing-user-warning findings.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

Line L190 includes the Chinese phrase 注意 platform differences inside an otherwise English reference document, forcing a specific language fragment without offering a user choice. Under the language/locale policy rule, mixed-language instructions can be a violation when not clearly justified or opt-in.

Content

No source excerpt is available for this finding.