Back to skill

Security audit

小程序国际化适配Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent WeChat Mini Program internationalization scanner and guidance package, with normal setup and example-code risks but no artifact-backed malicious behavior.

Install only in a normal least-privilege project environment, prefer pinning dependencies or using a reviewed lockfile, and treat the auth and locale-routing snippets as examples that need production privacy, abuse-prevention, and user-choice controls.

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
validation/package.json:9
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: validation/package.json:9-11; installation instructions at SKILL.md:20-24 and README.md:49-52
Vulnerability Type: Supply-chain risk caused by non-reproducible dependency resolution
Risk Level: Medium

Vulnerable Code

validation/package.json:9-11:

json
"dependencies": {
  "fast-glob": "^3.3.2"
}

SKILL.md:20-24:

bash
# Method A: enter the skill directory before execution
cd <skill-directory>/validation
npm install
node scan-project.js --project <mini-program-project-path>

README.md:49-52:

bash
cd validation
npm install

Technical Analysis

The project directs users or agents to run npm install, but the dependency is specified using the floating caret range ^3.3.2, and no package lockfile is present in the audited directory structure. Consequently, dependency resolution is not reproducible: later installations may retrieve versions or transitive dependency trees that differ from those reviewed during this audit.

npm installation can also execute package lifecycle scripts unless explicitly disabled. If an allowed package version or any transitive dependency is compromised, malicious installation code could run with the privileges of the user invoking npm install. The runtime scanner subsequently loads fast-glob through require('fast-glob'), providing another execution point for a compromised package.

This finding does not establish that the current fast-glob package is malicious. It identifies an unsafe dependency-management practice that leaves the effective installed code outside the reviewed and fixed artifact.

Attack Path

  1. An attacker compromises a future version of the permitted dependency or one of its transitive dependencies.
  2. The malicious version remains compatible with the ^3.3.2 range.
  3. A user or AI agent follows the documented setup procedure and runs `npm in ...[truncated 1004 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin direct dependencies to exact reviewed versions, for example:
    json
    "fast-glob": "3.3.2"
    
  2. Generate, review, and commit a package-lock.json containing the complete dependency graph and integrity hashes.
  3. Replace documented npm install commands with npm ci, which installs exactly from the lockfile and fails if package metadata and the lockfile disagree.
  4. Use npm ci --ignore-scripts when dependency lifecycle scripts are not required.
  5. Audit the resolved dependency tree with an appropriate software-composition analysis tool before release and after dependency updates.
  6. Perform dependency upgrades through reviewed pull requests, and regenerate the lockfile only in a controlled environment.
  7. Run the scanner with least privilege and restrict its filesystem and network access where practical.
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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (24)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node validation/scan-project.js --project <小程序项目路径>

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 · reference.md (reported line 12)May include surrounding context.

1.1 手机号快速验证组件(推荐方式)

html
<!-- WXML -->
<button open-type="getPhoneNumber" bindgetphonenumber="onGetPhoneNumber">
  授权手机号
</button>

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 · reference.md (reported line 157)May include surrounding context.

1.4 邮箱验证入口

html
<!-- WXML:邮箱验证入口 -->
<view class="auth-options">
  <button bindtap="switchToPhone" class="{{authMode === 'phone' ? 'active' : ''}}">
    Phone

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 · reference.md (reported line 157)May include surrounding context.

1.4 邮箱验证入口

html
<!-- WXML:邮箱验证入口 -->
<view class="auth-options">
  <button bindtap="switchToPhone" class="{{authMode === 'phone' ? 'active' : ''}}">
    Phone

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README is written entirely in Chinese and frames the skill around Chinese-language guidance for WeChat Mini Program developers, while the content discusses international users and multilingual adaptation. There is no indication that the skill can operate in other languages or that the Chinese-only interface is a documented, justified locale restriction.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The auto-activation rule uses a broad, loosely bounded set of keywords spanning generic internationalization, search, routing, and multiple file types, which can cause the skill to trigger in contexts not specifically about this capability. Unintended activation can lead the agent to run scans, suggest file modifications, or request elevated tool usage on unrelated projects, increasing the chance of unnecessary code access or disruptive actions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

This example sends a phone-auth code obtained from the platform to an external backend endpoint. Although expected in an auth flow, it involves transmission of authentication-related data to a remote service and, in a skill context, lacks accompanying guidance on transport security validation, backend trust boundaries, retention, and minimization.

Content

Scanner excerpt · reference.md (reported line 25)May include surrounding context.

md
if (e.detail.errMsg === 'getPhoneNumber:ok') {
      const { code } = e.detail
      wx.request({
        url: 'https://api.yourapp.com/auth/phone',
        method: 'POST',
        data: { code },
        success(res) {

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The sample posts a full international phone number to a remote SMS endpoint, which is personally identifiable information. In isolation this is normal application behavior, but as a reusable skill example it omits safeguards like abuse throttling, consent language, masking, and backend-side rate limiting, increasing the chance of unsafe implementation.

Content

Scanner excerpt · reference.md (reported line 106)May include surrounding context.

md
const { selectedAreaCode, phoneNumber } = this.data
    const fullNumber = selectedAreaCode.code + phoneNumber
    wx.request({
      url: 'https://api.yourapp.com/sms/send',
      method: 'POST',
      data: { phone: fullNumber },
      success: () => {

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The example transmits an email address to an external endpoint to send a verification code, which exposes personal data and can be abused for account enumeration or spam if implemented carelessly. The skill context makes this risk real because it is presented as a copyable reference without defensive controls.

Content

Scanner excerpt · reference.md (reported line 216)May include surrounding context.

md
async sendEmailCode() {
    if (!this.validateEmail()) return
    wx.request({
      url: 'https://api.yourapp.com/email/send-code',
      method: 'POST',
      data: { email: this.data.email },
      success: () => {

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The verify flow sends both email and verification code to a remote endpoint, handling authentication material and PII. Without guidance on brute-force protections, replay limits, and generic error handling, implementers may expose users to code-guessing and account-enumeration risks.

Content

Scanner excerpt · reference.md (reported line 236)May include surrounding context.

md
async verifyEmail() {
    wx.request({
      url: 'https://api.yourapp.com/email/verify',
      method: 'POST',
      data: { email: this.data.email, code: this.data.verifyCode },
      success(res) {

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The i18n module initializes to zh_CN and maps zh_TW to zh_CN, causing users to be placed into a Chinese locale experience without explicit user choice. In an adaptation skill, this can misroute content, consent text, and UX behavior based on inferred locale rather than an explicit preference, which creates privacy/fairness and potentially compliance issues.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The router logic infers 'overseas' status purely from system language and then routes users to different pages. This is dangerous because language is an unreliable proxy for geography or eligibility, and using it to segment experiences can deny access, alter disclosures, or create discriminatory behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The UI conditionally hides or shows features based on inferred overseas status derived from language, including marketing and task-center functionality. When feature access changes based on a locale inference, users may lose access to services or receive unequal treatment without transparency or consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file contains user-/agent-facing natural-language guidance entirely in Chinese, including the purpose and usage comments. Under the policy, forcing a specific language without opt-in is a locale-policy violation unless the constraint is clearly justified and documented.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The final console message tells the AI agent what to do next, but does so only in Chinese. Because the file does not offer a language choice or justify a Chinese-only locale requirement, this conflicts with the natural-language locale policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This JavaScript file is in scope for SQP-3, which applies to all file types. The comments and subsequent logic are explicitly designed to flag pure Chinese UI text and recommend English-facing naming and multilingual support, which imposes a language/locale policy rather than offering a user-selected or region-justified option.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The message states that overseas users cannot find the mini program without English keywords, and similar messages later treat pure Chinese labels as inherently problematic. This is a natural-language locale policy embedded in code strings, with no indication that the check is optional, user-configurable, or limited to a specific market.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

These messages explicitly say pure Chinese text should be dynamically internationalized because overseas users cannot understand it. That constitutes a built-in locale policy in natural language, and the file does not present it as an opt-in rule or justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This JavaScript file contains natural-language comments and emitted finding messages in Chinese, including explanatory text and warning strings, with no indication that the skill is China-specific or that users can opt into this locale. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The message fields added to findings are hard-coded in Chinese, so anyone consuming this skill's output receives a forced locale with no opt-in or fallback. Because these strings are user-visible outputs rather than internal implementation details, this is a clear language-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file describes the tool solely in Chinese as a scanner for overseas adaptation of mini-programs, and later emits Chinese-only console/report text. This imposes a specific language on users of the skill without offering a language choice or documenting a justified locale restriction in the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The natural-language text repeatedly identifies the skill as '小程序国际化适配skill', which indicates a Chinese-language naming convention without any accompanying user choice or explanation of locale scope. This can conflict with organizational language/locale policies when a skill appears to assume a specific language by default.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · LICENSE (reported line 12)May include surrounding context.

text
--------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · validation/package.json (reported line 10)May include surrounding context.

json
"scan": "node scan-project.js"
  },
  "dependencies": {
    "fast-glob": "^3.3.2"
  },
  "license": "MIT-0",
  "engines": {