Logo di Wxmini Audit

Wxmini Audit

Community
txluck
wxmini-audit

微信小程序静态安全审计 Skill。输入:已反编译的小程序源码目录。输出:覆盖敏感信息、API 接口、加解密、漏洞、定向深挖五大维度的完整审计报告。架构:Orchestrator + 7 Agent 协作 + Phase 2 四路并行。所有 grep / 正则规则内置在各 Agent 中,不依赖任何外部脚本或反编译工具。

Panoramica

Autoretxluck
Repositorysecweb
Nome della skillwxmini-audit
Stelle
35
Fork
4
File inclusi
7
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • 7 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da txluck su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Wxmini Audit in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/txluck/secweb/tree/main/minisecprogram-audit
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/txluck/secweb.git /tmp/secweb
mkdir -p .claude/skills
cp -r /tmp/secweb/minisecprogram-audit .claude/skills/wxmini-audit
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Wxmini Audit in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Wxmini Audit non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Wxmini Audit non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Skill: wxmini-audit — 微信小程序静态安全审计

一行总览

输入反编译后的源码目录,输出一份能直接交付的安全审计报告 + 一份可灌入 Burp/FFUF 的接口 Fuzz 列表。

核心原则(所有 Agent 必须遵守)

  1. 纯静态分析

    • 严禁发起任何 HTTP/HTTPS 请求(curl / wget / fetch / Invoke-WebRequest 等一律禁止)
    • 不验证密钥 / Token / 接口 / 域名 是否生效
    • 不连接任何远程服务(DB / Redis / MQ / API)
    • 不下载、不更新任何远程资源
    • 全部分析必须基于 {target_dir} 下的本地文件
  2. 不生成攻击载荷

    • 不生成 PoC 漏洞利用脚本
    • 不生成自动化攻击工具
    • 报告仅供安全审计与防御参考
  3. 最小权限

    • 仅读 {target_dir} 下源码
    • 仅向 {output_dir} 写入分析产物
    • 不修改、不删除任何源文件
  4. 流程不可压缩

    • 必须按 Phase 0 → Phase 1 → Phase 2(全部 4 个 Agent 并行) → Phase 2.5(条件) → Phase 3 顺序执行
    • 不允许跳阶段、合并阶段、改变顺序

编排器铁律(硬性约束,违反等同审计失败)

⛔ 以下规则不可违反。

  1. 严禁代劳:Orchestrator 自身不得直接产出任何 *_analysis.json / *_report.json / security_report.md。所有分析输出只能由对应子 Agent 生成。
  2. 严禁跳阶段:每个 Phase 必须按序执行,不得以"已知结果""时间不够""Agent 太慢"为由跳过。Phase 2.5 一旦满足触发条件(custom_requests.has_custom_requests == true),必须启动 DeepDive,不得自行替代。
  3. 严禁截留外部信息:Orchestrator 在与用户交互中获取的所有外部数据(Burp 抓包、用户补充情报、其他 MCP 工具返回值)必须完整传给 DeepDive。
  4. 等待期间禁分析:Phase 2 四 Agent 启动后,Orchestrator 唯一允许做的是等待,不得分析代码 / 不得处理用户特定接口请求 / 不得提前生成报告。
  5. 报告完整性:Reporter 输出中,所有敏感信息发现 + 所有 API 接口必须逐条记录,不得丢失。主报告列关键发现,完整数据走 secrets_full.md 与 api_endpoints_full.md。

触发方式

用户用以下任一方式触发本 Skill:

帮我分析这个小程序 /path/to/decompiled/source
审计这个小程序 ~/work/wxmini-decompiled
分析一下这个微信小程序 {目录路径}

支持携带定向需求(自动触发 Phase 2.5):

帮我分析这个小程序 {目录},重点看 /api/user/login 接口
审计这个小程序 {目录},Burp 抓包发现 /api/order amount 可篡改
分析这个小程序 {目录},关注支付安全和越权风险

本 Skill 不做反编译。{target_dir} 必须已经是反编译产物,目录下应包含 .js / .json / .wxml 等文件。如果用户给的是 .wxapkg,Inventory Agent 会终止并提示先用反编译工具(unveilr / wxappUnpacker / 类似)处理。

变量定义

变量含义解析方式
{target_dir}已反编译的小程序源码根目录从用户输入提取(支持绝对/相对/~/)
{output_dir}审计输出目录在用户当前工作目录 CWD 下创建 wxaudit-output,已存在则追加 -{YYYYMMDD-HHMMSS}
{skill_dir}本 Skill 安装目录SKILL.md 所在目录绝对路径

输出目录禁止写到 {target_dir} 下,避免污染源码。

Agent 索引

7 个 Agent 全部位于 {skill_dir}/agents/:

#Agent文件阶段职责
01Inventoryagent-01-inventory.mdPhase 1文件资产清单
02SecretHunteragent-02-secret-hunter.mdPhase 2敏感信息全量挖掘
03EndpointMapperagent-03-endpoint-mapper.mdPhase 2接口提取与拓扑映射
04CryptoInspectoragent-04-crypto-inspector.mdPhase 2加解密 / 签名审查
05VulnHunteragent-05-vuln-hunter.mdPhase 2八大维度漏洞挖掘
06Reporteragent-06-reporter.mdPhase 3报告与完整性兜底
07DeepDiveagent-07-deep-dive.mdPhase 2.5用户定向深挖(条件触发)

执行流程

用户输入: "帮我分析这个小程序 {target_dir} [+ 可选定向需求]"
        │
        ▼
┌──────────────────────────────────────────────────┐
│  Phase 0: 需求解析(Orchestrator 自身完成)        │
│  · 提取 {target_dir}                              │
│  · 创建 {output_dir}(CWD 下新建)                 │
│  · 解析 custom_requests                           │
│  · 不启动子 Agent                                 │
└──────────────────┬───────────────────────────────┘
                   │
                   ▼
┌──────────────────────────────────────────────────┐
│  Phase 1: 源码资产清单                            │
│  agent-01-inventory.md → file_inventory.json     │
└──────────────────┬───────────────────────────────┘
                   │
                   ▼
┌──────────────────────────────────────────────────────────────────────────┐
│  Phase 2: 四路并行(必须全部启动)                                          │
│                                                                          │
│  ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐     │
│  │SecretHunter  │ │EndpointMapper│ │CryptoInspect.│ │VulnHunter    │     │
│  │ agent-02     │ │ agent-03     │ │ agent-04     │ │ agent-05     │     │
│  │              │ │              │ │              │ │              │     │
│  │secrets_      │ │api_endpoints │ │crypto_       │ │vuln_         │     │
│  │report.json   │ │.json +       │ │analysis.json │ │analysis.json │     │
│  │              │ │endpoints_    │ │              │ │              │     │
│  │              │ │fuzz.txt      │ │              │ │              │     │
│  └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘     │
│         │                │                │                │             │
│  Orchestrator 等待 4 路全部完成                                          │
└─────────┼────────────────┼────────────────┼────────────────┼─────────────┘
          │                │                │                │
          ▼                ▼                ▼                ▼
┌──────────────────────────────────────────────────────────────────────────┐
│  Phase 2.5: 定向深挖(条件触发)                                          │
│  仅当 custom_requests.has_custom_requests == true                        │
│  agent-07-deep-dive.md → custom_analysis.json                            │
└──────────────────┬───────────────────────────────────────────────────────┘
                   │
                   ▼
┌──────────────────────────────────────────────────────────────────────────┐
│  Phase 3: 报告生成                                                        │
│  agent-06-reporter.md                                                    │
│  → security_report.md / api_endpoints_full.md / secrets_full.md          │
│  → findings.json / domains.txt / endpoints_fuzz.txt(校验)               │
└──────────────────────────────────────────────────────────────────────────┘

详细编排指令

Phase 0:需求解析(Orchestrator 自身完成)

  1. 提取 {target_dir}

    • 从用户输入识别路径(/、~、./ 起始的字符串均视为路径)
    • 若不存在或不可读 → 终止,提示用户检查
    • 若是 .wxapkg 文件 → 终止,提示"本 Skill 不做反编译,请先解包"
  2. 创建 {output_dir}

    • {output_dir} = {CWD}/wxaudit-output
    • 若已存在 → 改用 {CWD}/wxaudit-output-{YYYYMMDD-HHMMSS}
    • 用 mkdir -p 创建
  3. 解析 custom_requests

    检测用户输入是否包含定向信号:

    • 接口路径(/api/xxx / 完整 URL)
    • 参数名(如 token / amount / password)
    • 函数名(如 encryptPayload / login)
    • 关注词:重点看 / 关注 / 分析一下 / 测试 / 着重 / 检查
    • 抓包关键词:Burp / 抓包 / 请求 / 响应 / postman / 拦截
    • 安全领域:SQL 注入 / 越权 / IDOR / 支付 / 鉴权

    生成 custom_requests(内存对象,不写文件):

    json
    {
      "has_custom_requests": true,
      "targets": [
        { "type": "endpoint",  "value": "/api/pay/create", "context": "用户原文" },
        { "type": "parameter", "value": "amount",          "context": "..." },
        { "type": "focus_area","value": "支付安全",        "context": "..." },
        { "type": "burp_info", "value": "POST /api/order amount 可篡改", "context": "Burp 抓包" }
      ],
      "external_info": "用户提供的额外抓包/请求/响应详情"
    }

    无任何信号 → has_custom_requests: false,targets: []。

  4. 进入 Phase 1(无需验证)

Phase 1:源码资产清单

  1. 读 {skill_dir}/agents/agent-01-inventory.md 获取完整指令
  2. 启动 1 个 Agent(general-purpose),将 {target_dir}、{output_dir}、{skill_dir} 替换进 prompt
  3. 等待返回

Phase 1 验证(全部通过才进入 Phase 2):

  • {output_dir}/file_inventory.json 存在且非空
  • total_files > 0 且 js_files 数组非空
  • 不通过 → 终止,向用户报告原因

Phase 2:四路并行

同时启动 4 个 background Agent:

Agent提示词输入输出
SecretHunteragent-02-secret-hunter.md{target_dir} + file_inventory.jsonsecrets_report.json
EndpointMapperagent-03-endpoint-mapper.md{target_dir} + file_inventory.jsonapi_endpoints.json + endpoints_fuzz.txt
CryptoInspectoragent-04-crypto-inspector.md{target_dir} + file_inventory.jsoncrypto_analysis.json
VulnHunteragent-05-vuln-hunter.md{target_dir} + file_inventory.jsonvuln_analysis.json

启动方式:task 工具,mode="background",类型 general-purpose,先 Read 提示词文件全文,把内容拼进 prompt 参数,再把 {target_dir} / {output_dir} / {skill_dir} 替换为实际路径。

⛔ CryptoInspector / VulnHunter / SecretHunter / EndpointMapper 的隔离规则:

  • 这 4 个 Agent 的 prompt 严禁包含 custom_requests / 用户提到的特定接口/参数 / Burp 信息
  • 它们只做通用全量扫描
  • 用户的定向需求由 DeepDive 在 Phase 2.5 处理

等待规则(只做这一件事):

  • 启动后 Orchestrator 唯一职责是等 4 个 Agent 全部返回
  • 禁止读源码、禁止生成任何中间产物、禁止启动其他 Agent

Phase 2 验证:

  • 4 个 JSON 至少 3 个存在且为有效非空 JSON
  • 少于 3 个 → 终止
  • 不足但 ≥ 3 个 → 继续,记录缺失维度供 Reporter 标注

Phase 2.5:定向深挖(条件触发)

仅当 custom_requests.has_custom_requests == true 才执行,否则直接进 Phase 3。

  1. Read {skill_dir}/agents/agent-07-deep-dive.md
  2. 启动 DeepDive(general-purpose,可 background),prompt 包含:
    • 提示词全文
    • {target_dir} / {output_dir} / {skill_dir}
    • 完整的 custom_requests 对象
    • 完整的 用户外部情报(Burp 抓包细节等)— 严禁截留
    • Phase 2 已产出的 JSON 文件路径
  3. 等待返回

Phase 2.5 验证:

  • custom_analysis.json 存在 → 继续 Phase 3
  • 不存在 → 不阻断流程,提示用户"定向分析未完成",继续 Phase 3 并由 Reporter 在主报告标注

Phase 3:报告生成

  1. Read {skill_dir}/agents/agent-06-reporter.md
  2. 启动 Reporter(general-purpose),prompt 中包含:
    • 提示词全文
    • {output_dir}
    • has_custom_requests 标志(用于 QC 判断)
  3. 等待返回

Phase 3 验证:

  • security_report.md 存在且 ≥ 1KB
  • api_endpoints_full.md 存在
  • secrets_full.md 存在
  • findings.json 存在
  • domains.txt 存在
  • endpoints_fuzz.txt 存在
  • 不通过 → 重试一次 Reporter,仍失败则向用户报告并保留已有 JSON

完成后 Orchestrator 输出最终的简短摘要(从 Reporter 终端输出读取并转述)。

流程强制执行规则(再强调一遍)

⛔ 不可违反:

  1. 必须按 Phase 0 → 1 → 2 → 2.5(条件) → 3 顺序,不可跳步
  2. 每个 Phase 完成后必须验证产出
  3. Phase 2 必须启动全部 4 个 Agent
  4. 严禁 Phase 1 后直接进 Phase 3
  5. 严禁多 Phase 合并执行
  6. 用户定向需求只在 Phase 2.5 处理,Phase 2 各 Agent 只做通用扫描

⛔ 常见错误(绝对禁止):

  • ❌ 反编译后看一眼某接口就生成报告
  • ❌ 跳过 Phase 1 直接进 Phase 2
  • ❌ 仅启动 Phase 2 的 1~2 个 Agent 就进入下一阶段
  • ❌ 用户说"看一下 /api/xxx",就让 VulnHunter 专门查 /api/xxx(应该交给 DeepDive)
  • ❌ Orchestrator 自己写 vuln_analysis.json

输出文件清单

完成后 {output_dir} 下应有:

文件来源说明
file_inventory.jsonInventory文件资产清单
secrets_report.jsonSecretHunter敏感信息分析
api_endpoints.jsonEndpointMapper接口分析
endpoints_fuzz.txtEndpointMapperBurp/FFUF 友好的 Fuzz 列表
crypto_analysis.jsonCryptoInspector加解密 / 签名分析
vuln_analysis.jsonVulnHunter八大维度漏洞
custom_analysis.jsonDeepDive(可选)定向深挖
security_report.mdReporter主报告
api_endpoints_full.mdReporter完整接口列表
secrets_full.mdReporter完整敏感信息列表
findings.jsonReporter结构化汇总
domains.txtReporter域名清单

全部位于 {output_dir},不会污染 {target_dir}。

错误处理

场景处理
{target_dir} 不存在Phase 1 前终止,提示用户
{target_dir} 含 .wxapkgInventory 终止,提示先反编译
{target_dir} 无 .js 文件Inventory 终止,提示可能不是小程序源码
单个 Phase 2 Agent 失败记录,其他继续,Reporter 在覆盖率章节标注缺失
Phase 2 失败 ≥ 2 个终止,向用户报告
DeepDive 失败不阻断,主报告标注定向分析未完成
Reporter 失败重试一次,仍失败则提示并保留 JSON
用户定向目标在代码中找不到DeepDive 标 not_found 仍输出

大文件处理(Phase 2 各 Agent 通用)

大小策略
≤ 200KB直接 Read 全文
200KB ~ 500KBgrep 关键模式 + ±20 行上下文
500KB ~ 1MB仅 grep,严禁全文 Read
> 1MB仅扫 Critical / High 级别模式,在 large_files_* 字段标注

webpack 单文件打包(如 app-service.js)常 > 2MB,务必走 grep 路径。

覆盖率要求

  • JS 文件扫描覆盖率 ≥ 95%
  • JSON 配置文件扫描覆盖率 = 100%
  • 各 Agent 在输出 scan_summary.scan_coverage_percent 中如实记录

设计要点(本 Skill 与传统脚本式审计的差异)

  1. 零外部依赖:不需要 Python、不需要 unveilr、不需要任何二进制工具,Agent 直接用 grep + Read 完成所有扫描。
  2. 跨平台:macOS / Linux / Windows 均可运行(只要 Claude Code 在,grep / Read 在)。
  3. 责任分离:通用扫描(Phase 2 四路) vs 定向深挖(Phase 2.5)严格分开,避免上下文污染。
  4. 完整性兜底:Reporter 强制做行数自检,确保 _full.md 文档逐条覆盖。
  5. 可中断可重跑:每个 Phase 的产物独立 JSON,任意阶段失败都能重启该阶段而不影响已完成产物。

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Wxmini Audit?

微信小程序静态安全审计 Skill。输入:已反编译的小程序源码目录。输出:覆盖敏感信息、API 接口、加解密、漏洞、定向深挖五大维度的完整审计报告。架构:Orchestrator + 7 Agent 协作 + Phase 2 四路并行。所有 grep / 正则规则内置在各 Agent 中,不依赖任何外部脚本或反编译工具。

Perché usare Wxmini Audit su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Wxmini Audit è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Wxmini Audit in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/txluck/secweb/tree/main/minisecprogram-audit. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Wxmini Audit?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Wxmini Audit?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Wxmini Audit: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Wxmini Audit è gratuita?

Sì. È pubblicata su GitHub da txluck con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇