Back to skill

Security audit

test-1-1

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly documentation for WeChat Pay deductions, but it includes insecure HTTP callback examples for payment workflows that need human review before use.

Review this skill before installing or using it for production payment work. Do not copy any http:// callback URL examples; require HTTPS with valid certificates, verify callback signatures, enforce idempotency/replay controls, and redact secrets, signatures, personal data, and unnecessary response fields when troubleshooting.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
references/1-商户/示例代码/2-代扣扣款/申请扣款.md:40
Finding
Plaintext HTTP Callback Endpoints Are Permitted and Demonstrated<![CDATA[ ## Vulnerability Details **File Locations**: - `references/1-商户/接入指南/回调处理.md:27-30` - `references/2-服务商/接入指南/回调处理.md:29` - `references/1-商户/示例代码/1-用户签约/公众号纯签约.md:31` - `references/1-商户/示例代码/2-代扣扣款/申请扣款.md:40` - `references/2-服务商/接入指南/签名与验签规则.md:71,83,120` - `references/2-服务商/示例代码/2-代扣扣款/申请扣款.md:40` **Vulnerability Type**: Transmission of payment callback data over an unencrypted channel **Risk Level**: Medium ### Vulnerable Code The direct-merchant deduction example uses a plaintext callback endpoint: ```xml <notify_url>http://yoursite.com/wxpay.html</notify_url> ``` The service-provider deduction example contains the same insecure pattern: ```xml <notify_url>http://yoursite.com/wxpay.html</notify_url> ``` The callback guidance also explicitly permits callback URLs beginning with either HTTP or HTTPS rather than requiring HTTPS. ### Technical Analysis The Skill permits and repeatedly demonstrates unencrypted HTTP callback endpoints for financial agreement and deduction-result workflows. A developer following these stored examples may deploy a payment callback handler without transport-layer encryption. HTTP provides neither confidentiality nor transport integrity. An attacker positioned between WeChat Pay and the merchant endpoint could observe callback metadata, block callbacks, delay delivery, or replay captured requests. Proper V2 signature verification limits the attacker's ability to create or arbitrarily modify a valid signed callback, but it does not prevent disclosure, traffic analysis, denial of service, or replay of an authentic captured message. The risk is amplified because the Skill instructs the agent to retrieve and display stored examples rather than generate corrected implementations. Users may therefore copy the plaintext callback URL directly into an integration. ### Attack Path 1. A merchant requests a deduction or callback integration example from the Skill. 2. The Skill displays the stored example containing an `http:/ ...[truncated 1252 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require HTTPS for every public payment, agreement, refund, and deduction callback endpoint. 2. Replace every `http://` callback example with an `https://` example. 3. Update the callback guidance so that HTTPS is mandatory rather than presenting HTTP and HTTPS as equivalent options. 4. Require valid certificate-chain and hostname verification. Do not permit disabled TLS verification or self-signed certificates in production. 5. Continue verifying the V2 signature before parsing or acting on callback business fields. 6. Enforce replay and idempotency controls using the relevant transaction identifier, merchant order number, event type, and locally recorded processing state. 7. Compare callback amounts and merchant identifiers against authoritative local order records. 8. Return success only after durable, idempotent state processing has completed. 9. Use order-query and reconciliation workflows to recover from callbacks that are delayed, blocked, or lost. 10. Add a prominent warning that sample domains and callback URLs are placeholders and must not be copied unchanged into production. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (48)

Ae1

High
Category
analysis-evasion
Content
- 服务商模式 → [📄 服务商模式排障手册](./references/2-服务商/问题排查/排障手册.md)
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
The skill description and all invocation/examples are framed exclusively in Chinese, and the document provides no option to adapt to the user's preferred language. Under the policy, forcing a specific language without opt-in is a natural-language policy concern unless the locale restriction is explicitly justified.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
L077 specifies that calls may only be made during '北京时间每天 7:00 - 22:00', which imposes a Beijing-time locale constraint in natural language. The document does not offer a locale choice or explain that the skill is region-specific, so this is a policy-style locale restriction that should be documented more explicitly.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The example URL embeds a `notify_url` that decodes to plain HTTP, which can expose callback traffic to interception or tampering if copied into production. In a payment signing/deduction integration, asynchronous callback data may include contract or transaction state that must be protected in transit, so providing an insecure example without warning is unsafe guidance.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The document explains the payment-with-contract flow and mentions both payment and contract callbacks, but it does not warn implementers that this feature creates a recurring deduction agreement at payment time and therefore requires careful handling of asynchronous payment and contract result notifications. In a payment integration context, missing guidance around callback verification, state reconciliation, and user-consent implications can lead to incorrect contract activation, trust of forged notifications, or unsafe business logic around recurring charges.

Missing User Warnings

Medium
Confidence
83% confidence
Finding
This is a markdown file, so SQP-2 applies to missing user-facing warnings about actions that could affect user data or system integrity. The document explains when to call the close-order API and notes a 5-minute timing constraint, but it does not explicitly warn readers that invoking the API will stop further processing of the original unpaid order and should be used cautiously to avoid unintended order closure.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The guide explicitly asks users to provide full response bodies, Request-Ids, merchant IDs, business order numbers, and request timestamps, but gives no minimization or redaction guidance. In a payment troubleshooting context, those artifacts can contain sensitive operational metadata or identifiers that may be over-collected, exposed in chat logs, or mishandled by downstream systems and support personnel.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
The example includes `contract_display_account`, merchant identifiers, and a `notify_url`, indicating user/account-related data is passed during the signing process. The markdown explains how to invoke the flow but does not warn users or integrators that the operation shares data with WeChat's signing mini program and merchant backend.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
| 项 | 值 |
|---|---|
| 适用对象 | 服务商 |
| 请求 URL | `https://api.mch.weixin.qq.com/pay/downloadbill` |
| 请求方式 | POST |
| 数据格式 | XML(请求)/ CSV 文本(响应成功)/ XML(响应失败) |
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/1-商户/接入指南/签名与验签规则.md:201

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/2-服务商/接入指南/签名与验签规则.md:197