Back to skill

Security audit

汇付商户进件集成

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Huifu merchant onboarding helper, but it knowingly permits live PHP integrations through an SDK path with TLS certificate verification disabled.

Review before installing. This skill is useful for Huifu onboarding work, but do not rely on it for live PHP traffic unless you can confirm the SDK or transport validates TLS certificates and hostnames. Keep DEBUG disabled before SDK loading, keep private keys and KYC materials out of logs/frontends/examples, and require explicit user approval before sending real identity, banking, image, or business-configuration data to Huifu.

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

Error
Location
SKILL.md:139
Finding

Production PHP integrations are permitted despite disabled TLS certificate verification

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 139-141
Vulnerability Type: TLS certificate verification disabled in a prescribed production dependency
Risk Level: High

Relevant excerpt (English translation):

text
- The local SDK review found that the PHP 2.0.31 SDK still sets
  CURLOPT_SSL_VERIFYPEER=false. This is treated as a non-blocking warning
  rather than a prerequisite for continuing to use the official SDK.
- Generated business code must not add trust-all, verify=false, or other
  settings that disable TLS verification, and must not automatically modify
  the user's SDK. An existing TLS issue in the designated SDK is only
  reported as a warning and does not stop implementation.

The same policy is reinforced in SKILL.md:153-154, which permits continued use of PHP SDK 2.0.31 for integration or production work while treating its TLS condition as non-blocking.

Technical Analysis

The Skill explicitly records that the prescribed PHP SDK sets CURLOPT_SSL_VERIFYPEER=false. This disables validation of the remote server's certificate chain. Although the Skill prohibits generated code from introducing additional trust-all behavior, it knowingly permits production code to continue using a dependency whose existing transport implementation already disables peer verification.

HTTPS encryption without certificate authentication does not reliably establish the identity of the remote payment endpoint. A network-positioned attacker can present an arbitrary certificate and terminate the connection without possessing a certificate trusted for the intended API hostname.

This path is reachable when a user requests runnable PHP integration or production code and follows the Skill's SDK-first instructions. The Skill does not require remediation or verified secure transport before continuing.

Attack Path

  1. A user requests runnable PHP onboarding or production integration code.
  2. T ...[truncated 1451 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not generate or approve production PHP integrations that use an HTTP client with certificate verification disabled.
  2. Require a patched SDK version or secure transport adapter that validates both the certificate chain and the requested hostname.
  3. Verify the installed SDK source and runtime cURL options rather than relying solely on a version number.
  4. Add a fail-closed preflight check that rejects production execution when CURLOPT_SSL_VERIFYPEER is false or hostname verification is disabled.
  5. Preserve request signing and response verification while correcting the TLS transport; application-layer signatures are not a substitute for authenticated TLS.
  6. Add an integration test using an untrusted certificate and confirm that the connection is rejected.
  7. Treat inability to establish verified TLS as a hard stop for production and live integration traffic, rather than as a non-blocking warning.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (93)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 字段说明命中网页、编码表、XLSX 或协议 | 上一行基础上补 `references/merchant-onboarding-external-resources.md` |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 字段说明命中网页、编码表、XLSX 或协议 | 上一行基础上补 `references/merchant-onboarding-external-resources.md` |

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest description and visible skill content are written entirely in Chinese and present the skill as operating in that language by default. There is no indication that users may choose another language or locale, which can violate a language-choice policy when the skill is not explicitly documented as Chinese-only or region-restricted for organizational reasons.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
97% confidence
Finding

The skill explicitly documents that the referenced PHP SDK version uses CURLOPT_SSL_VERIFYPEER=false and also says this should be treated as a non-blocking issue. In a merchant onboarding/KYC/payment context, continuing with a known TLS-verification bypass exposes highly sensitive identity, banking, and onboarding data to man-in-the-middle interception or tampering if the unsafe SDK path is used.

Content

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

md
- Python 当前 SDK 为 `2.0.28`,版本和行为以用户提供的 `../sdk/dg_sdk-2.0.28/dg_sdk/` 源码为准;构造器、请求头、路由和图片边界已复核,不代表远端包可下载或真实网关联调成功。项目使用其他版本时核对实际安装源码,未明确差异留 TODO 并继续已明确部分;不清楚时可咨询汇付官方或汇付开发者交流沟通群,不设整体开发前置确认要求。
- `2026-09-24` 本地 SDK 复核:通用Java/Python主链路保留默认TLS校验;PHP `2.0.31` 仍设置 `CURLOPT_SSL_VERIFYPEER=false`。API 来源仍为 `2026-09-22`。该事实按上方开发提示非阻断说明,不作为继续使用官方 SDK 开发的前置门槛。
- Java `dg-java-sdk 3.0.41`、PHP `huifurepo/dg-php-sdk 2.0.31`、Python `dg-sdk 2.0.28` 的常规接口真实请求都使用官方 Request/Client 入口。官方 SDK 自带的通用调用入口(如 Java `BasePayClient.request(Map, funcCode, ...)`,内部把 `funcCode` 的 `.` 替换为 `/` 拼接 URL,并复用同一签名、验签、请求头与 TLS 链路)同样属于官方主链路,可用于 SDK 没有专属 Request/路由的常规接口,不限于图片接口,也不属于受控降级。唯一例外是 `/v2/supplementary/picture`:PHP/Python 的专用生成实现不可用时,可生成通用 POST 或自写 HTTP 传输适配器,但必须严格复刻图片专项 reference 的 multipart、签名、TLS 和日志合同;该例外限制的是离开官方 SDK 的手写实现,不得把例外扩散到其他接口。
- 生成的业务代码不新增trust-all、`verify=false` 或关闭TLS校验的设置,也不自动修改用户SDK;指定SDK已有TLS问题仅作提醒,不因此停止实现或要求修复证明。
- SDK 没有专属 Request/路由时,或虽有生成类/路由但实现不符合接口合同时,明确报告 SDK 能力差异;不得仅凭类名或路由常量宣称官方 SDK 已有专属支持。此时可经官方 SDK 通用调用入口生成可运行代码;因无类型化封装兜底,字段名、类型、长度、必填和 String(JSON) 编码必须逐项对照字段合同构造。商户费率查询仍禁止手写 HTTP;PHP/Python 图片上传按上述唯一例外允许受控降级。
- 多语言任务逐语言使用对应官方 SDK;一种语言成功不用于复制或反推另一语言的 DTO、wire 或签名实现。

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill enables implicit invocation without any visible trigger constraints, while its scope covers sensitive merchant onboarding, KYC, account opening, document upload, and business configuration actions. In that context, broad auto-invocation can cause the agent to route user requests into a high-privilege financial workflow unexpectedly, increasing the risk of unintended data handling, unsafe guidance, or action confusion across similarly related payment tasks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire skill file is written as a mandatory Chinese prompt set, including headings and prompt/expectation content, and it explicitly frames behavior such as '三语言必须使用官方 SDK' while not offering any user opt-in for language or locale. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale constraint is clearly documented and justified, which is not present here.

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 title and output specification are entirely in Chinese and present the expected response structure in Chinese, with no indication that the user may choose another language. This creates a natural-language locale constraint without documented opt-in or justification for a region-specific language requirement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document describes submission of highly sensitive identity and onboarding data, including legal-person, beneficiary, contact, certificate, license, and image IDs, to an external payment provider, but it does not include an explicit user-facing warning or consent cue about transmitting PII/KYC material off-platform. In a merchant onboarding context, omission of that notice increases the risk of accidental disclosure, misuse of regulated identity data, and user misunderstanding about where their data is sent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill is written in Chinese and provides no indication that users may interact in another language or choose a locale. Under the policy, language constraints should either be optional or explicitly justified as region-specific; this file does neither in its natural-language instructions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file presents all user-facing instructions in Chinese and does not indicate that the skill is region-specific or that users may choose another language. Under the policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The entire skill file is written only in Chinese and does not state that the language requirement is optional, user-selected, or limited to a specific regional compliance context. Under the policy criteria, forcing a specific language without opt-in can be 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
87% confidence
Finding

This file presents all operational instructions, constraints, and examples only in Chinese, and nowhere indicates that users may choose another language or that the skill is intentionally limited to a Chinese-speaking or region-specific audience. Under the policy, forcing a specific language without user opt-in can be 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
88% confidence
Finding

The title and the entire instruction set are written as mandatory Chinese output guidance, including prescriptive response structure and wording, but there is no indication that the user may choose another language. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file presents all user-facing guidance exclusively in Chinese and does not indicate that the skill is limited to Chinese-speaking users or provide an opt-in language choice. Under the stated policy, forcing a specific language without user opt-in 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
88% confidence
Finding

This markdown file presents all operational instructions, constraints, and warnings exclusively in Chinese. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified, which is not evident in the file.

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 presents all operational instructions, warnings, and field requirements exclusively in Chinese. Under the policy, forcing a specific language without user opt-in or a documented region-specific justification 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
92% confidence
Finding

The file presents all user-facing instructions and operational guidance exclusively in Chinese, and there is no indication that users can opt into another language or that the skill is restricted to a Chinese-only audience for compliance or regional reasons. Under the policy, forcing a specific language without user opt-in 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
87% confidence
Finding

The file presents all operational guidance, warnings, and constraints only in Chinese. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is explicitly justified, which is not stated in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire skill file is written in Chinese and does not offer any language or locale choice. Under the policy criteria, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The file is entirely written in Chinese and includes no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking or region-specific audience. Under the stated policy, forcing a specific language without opt-in can be 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
95% confidence
Finding

The entire skill file is written only in Chinese and does not offer any language or locale choice. Under the policy for natural-language violations, forcing a specific language without user opt-in should be flagged unless the locale constraint is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This file presents all operational guidance exclusively in Chinese and does not indicate that users may choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

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 · references/merchant-onboarding-alipay-realname-query.md (reported line 5)May include surrounding context.

md
## 接口合同

- Endpoint:`POST https://api.huifu.com/v2/agreement/elect/signurl/resend`。
- 官方来源:[电子合同重发](https://paas.huifu.com/partners/api/doc/shgl/fp/api_fp_dzhtcf.md);快照 `2026-09-22`;SHA-256 `169b62c666fbe0345ab4f5b10f7f39116d5fd774f6a04ec6abdb77c3923a156e`。
- 共13个路径:请求9、同步响应4、无异步。完整字段见 `onboarding-extension-complete-field-catalog.md`。
- 请求 data 必须包含 `req_seq_id/req_date/huifu_id/agreement_id/sign_user_email`;长度分别为 `32/8/32/32/64`,均为 String Y。

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 · references/merchant-onboarding-alipay-realname.md (reported line 5)May include surrounding context.

md
## 接口合同

- Endpoint:`POST https://api.huifu.com/v2/agreement/elect/signurl/resend`。
- 官方来源:[电子合同重发](https://paas.huifu.com/partners/api/doc/shgl/fp/api_fp_dzhtcf.md);快照 `2026-09-22`;SHA-256 `169b62c666fbe0345ab4f5b10f7f39116d5fd774f6a04ec6abdb77c3923a156e`。
- 共13个路径:请求9、同步响应4、无异步。完整字段见 `onboarding-extension-complete-field-catalog.md`。
- 请求 data 必须包含 `req_seq_id/req_date/huifu_id/agreement_id/sign_user_email`;长度分别为 `32/8/32/32/64`,均为 String Y。

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 · references/merchant-onboarding-application-status-query.md (reported line 9)May include surrounding context.

md
## 接口合同

- Endpoint:`POST https://api.huifu.com/v2/agreement/elect/signurl/resend`。
- 官方来源:[电子合同重发](https://paas.huifu.com/partners/api/doc/shgl/fp/api_fp_dzhtcf.md);快照 `2026-09-22`;SHA-256 `169b62c666fbe0345ab4f5b10f7f39116d5fd774f6a04ec6abdb77c3923a156e`。
- 共13个路径:请求9、同步响应4、无异步。完整字段见 `onboarding-extension-complete-field-catalog.md`。
- 请求 data 必须包含 `req_seq_id/req_date/huifu_id/agreement_id/sign_user_email`;长度分别为 `32/8/32/32/64`,均为 String Y。

Static analysis

No suspicious patterns detected.