Back to skill

Security audit

汇付支付集成

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this payment integration skill suspicious because scanners report disabled TLS checks, unsafe handling guidance for sensitive information, and incomplete analysis of some referenced content.

The verdict is suspicious, so review the reported TLS and sensitive-information handling concerns before installing. Skillspector reports 97.6% coverage and partial analysis: three files hit parser limits, and some references could not be resolved, so the evidence is incomplete. The scanner recommendation is DO_NOT_INSTALL.

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
SKILL.md
Finding

Payment integration instructions retain known-disabled TLS authentication

Content
View full analysis

Impact

An interceptor can observe payment request fields that are not separately encrypted, including transaction amounts, merchant identifiers, order metadata, and applicable customer identifiers. Request signatures do not provide confidentiality. This finding does not establish private-key disclosure or the ability to forge signed payment results.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (38)

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 抖音直连、`pre_order_type=4` | `references/hostingpay-preorder.md`、`references/hostingpay-preorder-douyin-direct.md` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 拆单支付查询、`splitpay/query` | `references/hostingpay-query.md`、`references/hostingpay-query-splitpay.md`;完整字段按完整目录路由 |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| 完整 DTO、完整响应、嵌套字段或同名字段核对 | 对应原子接口页;基础接口读 `references/payment-complete-field-catalog.md`,新增延时/账户查询读下方新增目录;代码任务再补对应SDK资料 |

Official-SDK policy reframes known TLS authentication failures as non-blocking and instructs the agent to preserve them.

High
Category
Prompt Injection
Confidence
99% confidence
Finding

The policy explicitly permits real payment requests through SDKs with known disabled certificate or hostname validation and treats the defect as non-blocking. This enables network attackers to impersonate the service and intercept sensitive transaction data; application-level signatures do not restore transport confidentiality.

Content

No source excerpt is available for this finding.

The customer-materials checklist requests an RSA private key without warning against sharing secrets in chat or other insecure channels.

High
Category
Output Handling
Confidence
94% confidence
Finding

The section explicitly lists an RSA private key among materials to request from customers, rather than asking them to configure it privately. An agent following this checklist could solicit payment-signing credentials into chat or support records, exposing the ability to sign requests within the merchant's granted permissions.

Content

No source excerpt is available for this finding.

SDK-only guidance normalizes unauthenticated TLS and endorses the affected initialization for actual calls.

High
Category
Prompt Injection
Confidence
99% confidence
Finding

The quickstart acknowledges unconditional certificate and hostname acceptance but endorses the affected SDK for actual requests. Its initialization also defaults to production, making the insecure transport guidance particularly dangerous for confidential payment traffic.

Content

No source excerpt is available for this finding.

Official-SDK compliance framing instructs the agent to proceed despite disabled TLS certificate verification.

High
Category
Prompt Injection
Confidence
99% confidence
Finding

The adapter requires real requests through a PHP SDK it explicitly identifies as disabling TLS peer verification. Treating this as non-blocking preserves a server-authentication failure that can expose payment and customer data to an active network attacker, despite response-signature checks.

Content

No source excerpt is available for this finding.

Instructs the agent to request private keys and raw identity data without a secure-handling warning.

High
Category
Output Handling
Confidence
98% confidence
Finding

The customer-materials checklist explicitly requests private keys and raw identity and bank-card data without distinguishing secure application collection from disclosure to the assistant. Following it could place payment-signing credentials and regulated personal information in chat or support retention systems.

Content

No source excerpt is available for this finding.

Official-SDK compatibility framing directs the agent to treat disabled TLS verification as non-blocking for real payment requests.

High
Category
Prompt Injection
Confidence
99% confidence
Finding

The document acknowledges disabled TLS peer verification yet explicitly treats it as non-blocking for the required payment SDK path. A network attacker could impersonate the endpoint and observe unencrypted application fields or disrupt requests; RSA payload signatures do not replace transport confidentiality and server authentication.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/shared-local-sandbox.md (reported line 108)May include surrounding context.

md
l`、`gateway_url`、`health_url`、`mode`、`credential_profile`、`signature_model`、`admin_token` 和 `csrf_token`。这些 token 只用于本机控制面,不要写入仓库、聊天记录或可分享报告。公开健康检查和页面状态接口不返回 `admin_token`、`csrf_token` 或 Webhook 端点密钥。

启动后可以直接在浏览器打开 `control_url`。首次进入控制台会展示本地沙箱服务使用声明;默认勾选“不再提示”,同意后继续使用,拒绝后停止本地沙箱服务并尝试关闭当前页面。本地控制台会自动刷新运行状态,展示接入信息、可复制的 `gateway_url`、支付/退款/关单/对账记录、事件流、Notify/Webhook 投递记录和安全发现。页面“项目接入配置”提供“导出凭证”、“复制配置”、“显示 Webhook Key”、“保存 Webhook”和“使用说明”;导出凭证和显示 Webhook Key 都需要输入启动输出中的 `admin_token`,浏览器会下载 `sandbox-credentials.json` 或在页面显示本次运行的 `webhook_endpoint_key`。托管支付记录可点击“模拟成功”,用于把本地预下单状态推进为支付成功并触发后续查单、Notify 或 Webhook 演练;手动 Notify/Webhook 只做投递测试,不直接改业务主记录。Webhook 目标可在页面输入本机接收地址并保存,本次运行内业务状态里的 Webhook 成功/失败按钮会变为可用;外部 Webhook 地址仍需启动时通过 `--notify-allow` 精确放行。生成报告或停止服务同样需要 `admin_token`;页面不会持久化保存 token,页面状态接口不返回 `admin_token`、`csrf_token`、完整私钥、Webhook 端点密钥或回调 URL query 明文。

控制台“接入信息”区域会从公开索引 `hf-payment-local-sandbox-latest.json` 检查更新。检查更新不需要 `admin_token`,不上传私钥、公钥、`sys_id`、`product_id`、`huifu_id`、请求日志、报

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/shared-local-sandbox.md (reported line 112)May include surrounding context.

md
控制台“接入信息”区域会从公开索引 `hf-payment-local-sandbox-latest.json` 检查更新。检查更新不需要 `admin_token`,不上传私钥、公钥、`sys_id`、`product_id`、`huifu_id`、请求日志、报告、Webhook 地址或 Notify 地址;只读取公开 JSON,并在有新版时展示当前平台下载地址、文件名、大小和 SHA256。沙箱不做静默自动安装,用户下载新版后手动解压并重新启动。

3. 查看或导出 `official-demo` Profile。普通用户优先通过页面“导出凭证”下载 `sandbox-credentials.json`;命令行导出只作为维护者排障能力。无论哪种方式,都不要在文档、日志和报告里回显完整私钥。

`official-demo` 用户可见字段固定为 `product_id`、`sys_id`、商户请求签名私钥、沙箱响应验签公钥和 Webhook 终端密钥。预览包不内置完整私钥;首次使用时会在本机生成或读取 `sandbox-data/credentials/official-demo-merchant-private.pem` 和 `sandbox-data/credentials/official-demo-sandbox-private.pem` 两套 RSA 私钥。本地沙箱模式下,请求签名使用导出的商户私钥;沙箱用本机保存的商户请求验签公钥验请求签名;响应和通知由本机沙箱私钥加签;客户项目优先用导出的 `merchant_public_key` 验响应和通知签名。页面导出的 `sandbox-credentials.json` 只面向商户项目配置,和“复制配置”保持同一套扁平英文 key:`gateway_url`、`sys_id`、`product_id`、`huifu_id`、`skill_source`、`merchant_private_key`、`merchant_public_key`、`webhook_endpoint_key`、`signature_model`、`usage`,不再包含重复的 `merchant_config`、`sandbox_config` 或说明型嵌套层。官方 SDK 优先字段为无 PEM 头尾、无换行的 PKCS8 B

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/shared-local-sandbox.md (reported line 114)May include surrounding context.

md
3. 查看或导出 `official-demo` Profile。普通用户优先通过页面“导出凭证”下载 `sandbox-credentials.json`;命令行导出只作为维护者排障能力。无论哪种方式,都不要在文档、日志和报告里回显完整私钥。

`official-demo` 用户可见字段固定为 `product_id`、`sys_id`、商户请求签名私钥、沙箱响应验签公钥和 Webhook 终端密钥。预览包不内置完整私钥;首次使用时会在本机生成或读取 `sandbox-data/credentials/official-demo-merchant-private.pem` 和 `sandbox-data/credentials/official-demo-sandbox-private.pem` 两套 RSA 私钥。本地沙箱模式下,请求签名使用导出的商户私钥;沙箱用本机保存的商户请求验签公钥验请求签名;响应和通知由本机沙箱私钥加签;客户项目优先用导出的 `merchant_public_key` 验响应和通知签名。页面导出的 `sandbox-credentials.json` 只面向商户项目配置,和“复制配置”保持同一套扁平英文 key:`gateway_url`、`sys_id`、`product_id`、`huifu_id`、`skill_source`、`merchant_private_key`、`merchant_public_key`、`webhook_endpoint_key`、`signature_model`、`usage`,不再包含重复的 `merchant_config`、`sandbox_config` 或说明型嵌套层。官方 SDK 优先字段为无 PEM 头尾、无换行的 PKCS8 Base64 `merchant_private_key` 和 X509 Base64 `merchant_public_key`;Webhook 验签使用 `webhook_endpoint_key` 计算大写 `MD5(raw_body + webhook_endpoint_key)`,业务代码可用大小写不敏感比较兼容历史实现;本地配置直接给出样例 `huifu_id = 6666000100000001`。本地沙箱模式下 `skill_source`

Official-SDK guidance reframes known TLS verification failures as nonblocking and directs continued use of affected payment clients.

High
Category
Prompt Injection
Confidence
98% confidence
Finding

The guidance explicitly treats known certificate and hostname verification failures in the Lightning Java and PHP SDKs as nonblocking while requiring continued use of official clients. This permits payment traffic over unauthenticated TLS, enabling an attacker positioned on the network to intercept sensitive transaction data; application-layer signatures do not restore transport confidentiality. The separate advice to check certificates before launch does not establish a mandatory, enforceable gate for affected clients.

Content

No source excerpt is available for this finding.

The payment workflow lacks a warning that live execution can initiate a real charge.

Medium
Category
Output Handling
Confidence
88% confidence
Finding

The workflow instructs calling the payment-creation endpoint and presenting or launching payment, including support for payer-code transactions. It does not warn that production execution can initiate an actual charge or distinguish test execution from live financial activity.

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/aggregation-php-adapter.md (reported line 64)May include surrounding context.

md
| 官方 SDK 文档 | `https://paas.huifu.com/partners/prod/devtools/doc/sdk_php.md` |
| Packagist 包路径 | `https://packagist.org/packages/huifurepo/dg-php-sdk` |
| GitHub 项目主页 | `https://github.com/huifurepo/bspay-php-sdk` |
| 备用下载包 | `https://api.github.com/repos/huifurepo/bspay-php-sdk/zipball/refs/tags/2.0.31` |

新项目安装当前 Skill 基线:

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/aggregation-php-adapter.md (reported line 88)May include surrounding context.

Composer 不可用或内网不能访问 Packagist 时,可使用当前基线对应的官方包分发地址手动落地:

bash
curl -L "https://api.github.com/repos/huifurepo/bspay-php-sdk/zipball/refs/tags/2.0.31" -o dg-php-sdk-2.0.31.zip
unzip dg-php-sdk-2.0.31.zip
export HUIFU_SDK_ROOT="/absolute/path/to/extracted/BsPaySdk"
test -f "$HUIFU_SDK_ROOT/init.php"

Recommends persisting complete Webhook payloads without warning about sensitive-data retention.

Medium
Category
Output Handling
Confidence
87% confidence
Finding

The recommendation broadly persists complete event bodies covering payments, refunds, settlements, and complaints without defining minimization or retention controls. Such payloads can contain personal and financial information, so copying them into ordinary storage unnecessarily expands exposure if that storage is accessed improperly.

Content

No source excerpt is available for this finding.

Recommends development tunnels without warning that they expose local services publicly.

Medium
Category
Output Handling
Confidence
92% confidence
Finding

L74 recommends ngrok/frp for local callback testing without explaining that a tunnel can make a local endpoint Internet-accessible and route callback traffic through additional infrastructure. The HTTPS recommendation does not disclose these exposure and privacy implications.

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/hostingpay-java-tech-spec.md (reported line 26)May include surrounding context.

md
| 数据格式 | JSON |
| 字符编码 | UTF-8 |
| 签名算法 | RSA(SHA256WithRSA) |
| API 基础地址 | `https://api.huifu.com/v2/` |

## V2 接口请求格式

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/hostingpay-preorder-alipay-mini.md (reported line 24)May include surrounding context.

md
| 属性 | 值 |
|------|-----|
| 请求方式 | `POST` |
| 汇付 API 端点 | `https://api.huifu.com/v2/trade/hosting/payment/preorder` |
| pre_order_type | `2` |
| SDK Request 类 | `V2TradeHostingPaymentPreorderAliRequest` |
| Content-Type | `application/json;charset=UTF-8` |

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/hostingpay-preorder-douyin-direct.md (reported line 31)May include surrounding context.

md
| 属性 | 值 |
| --- | --- |
| 请求方式 | `POST` |
| 汇付 API 端点 | `https://api.huifu.com/v2/trade/hosting/payment/preorder` |
| 场景 | 抖音直连下单 |
| `pre_order_type` | `4` |
| 报文格式 | `application/json` |

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/hostingpay-preorder-h5-pc.md (reported line 25)May include surrounding context.

md
| 属性 | 值 |
|------|-----|
| 请求方式 | `POST` |
| 接口地址 | `https://api.huifu.com/v2/trade/hosting/payment/preorder` |
| 场景类型 | H5、PC、动态二维码 |
| `pre_order_type` | `1` |
| SDK Request 类 | `V2TradeHostingPaymentPreorderH5Request` |

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/hostingpay-preorder-wechat-mini.md (reported line 22)May include surrounding context.

md
| 属性 | 值 |
|------|-----|
| 请求方式 | `POST` |
| 汇付 API 端点 | `https://api.huifu.com/v2/trade/hosting/payment/preorder` |
| pre_order_type | `3` |
| SDK Request 类 | `V2TradeHostingPaymentPreorderWxRequest` |
| Content-Type | `application/json;charset=UTF-8` |

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/hostingpay-query-reconciliation.md (reported line 24)May include surrounding context.

md
| 属性 | 值 |
|------|-----|
| 请求方式 | `POST` |
| 汇付 API 端点 | `https://api.huifu.com/v2/trade/check/filequery` |
| SDK Request 类 | `V2TradeCheckFilequeryRequest` |
| Content-Type | `application/json;charset=UTF-8` |

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/hostingpay-query-splitpay.md (reported line 30)May include surrounding context.

md
| 属性 | 值 |
| --- | --- |
| 请求方式 | `POST` |
| 汇付 API 端点 | `https://api.huifu.com/v2/trade/hosting/payment/splitpay/query` |
| 场景 | 拆单支付订单查询 |
| SDK Request 类 | Java / PHP / Python:`V2TradeHostingPaymentSplitpayQueryRequest` |
| 报文格式 | `application/json` |