Back to skill

Security audit

汇付支付集成

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this payment integration skill suspicious because it reports serious payment, credential, and privacy risks, while some referenced material was only partially analyzed.

The verdict is suspicious, so consider the reported risks carefully before installing. In particular, weigh the private-key and personal-data collection guidance, real-payment examples with TLS validation concerns, and production-oriented operations. The scan was mostly complete, but several components were only partially analyzed, so it cannot establish that unreviewed portions are safe.

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

Real payment integrations retain explicitly documented TLS authentication failures

Content
View full analysis

Impact

An interceptor can observe transaction details and identifiers transmitted in request bodies. Application-layer RSA signatures authenticate data but do not encrypt it. This finding does not establish disclosure of the locally held RSA private key, successful forgery of signed responses, or unauthorized fund transfers.

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 (41)

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 60)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 61)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 75)May include surrounding context.

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

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 93)May include surrounding context.

md
| 版本与升级 | `references/skill-version-policy.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 136)May include surrounding context.

md
| 版本与升级 | `references/skill-version-policy.md` |

The customer-material checklist requests an RSA private key without a secret-handling warning.

High
Category
Output Handling
Confidence
96% confidence
Finding

The checklist explicitly includes an RSA private key among materials to request from customers, rather than limiting the request to confirmation of secure local configuration. An assistant following it could solicit payment-signing credentials through chat or support records, potentially enabling unauthorized signed requests if other required account information is available.

Content

No source excerpt is available for this finding.

The duplicate-transaction advice omits a warning that using a new request ID can cause a second payment.

High
Category
Output Handling
Confidence
97% confidence
Finding

Unconditionally recommending a new request ID after a duplicate-transaction response can bypass the original request's idempotency protection while that payment has already succeeded or remains pending. The surrounding guidance to query transaction status helps generally, but does not make this specific retry instruction conditional on resolving the original payment.

Content

No source excerpt is available for this finding.

Customer-material checklist requests private keys and raw identity information without safe-handling warnings.

High
Category
Output Handling
Confidence
97% confidence
Finding

The customer-material checklist asks for payment-signing private keys and, in some scenarios, raw identity and bank-card numbers without restricting how they are collected. This can cause an assistant to solicit highly sensitive values into retained conversations or tickets; the separate instruction to encrypt API fields does not protect that earlier collection.

Content

No source excerpt is available for this finding.

The customer-materials checklist directs collection of RSA private keys and, for some scenarios, raw identity and bank-card numbers.

High
Category
Data Exfiltration
Confidence
96% confidence
Finding

The checklist affirmatively directs collection of private signing keys and raw identity or bank-card information as customer-provided materials. These values may be needed inside an authorized payment system, but collecting them through the assistant's ordinary material-gathering workflow creates unnecessary credential-disclosure and personal-data exposure risks.

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 framing directs the agent to proceed despite known TLS authentication failures.

High
Category
Prompt Injection
Confidence
99% confidence
Finding

The guidance explicitly permits real payment requests through SDK versions with disabled certificate or hostname validation and treats these defects as nonblocking. An active network attacker could impersonate the gateway and read sensitive payment traffic; application-level signatures do not restore TLS confidentiality or fully compensate for missing server authentication.

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"

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-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/hostingpay-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"

Python examples are forced to production without warning that executing payment operations can affect real funds and live orders.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

The adapter explicitly forces generated examples to production and disallows an environment-selection path, making development calls target live payment services once real credentials are configured. Initialization alone does not move funds, but subsequent create or refund calls generated under this policy can affect real orders without a separate live-operation safeguard.

Content

No source excerpt is available for this finding.

The adapter mandates production mode without warning that running the examples contacts live services and can send real SMS messages.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

The adapter mandates production configuration and provides a helper that invokes the live SMS-sending endpoint when called. Although defining the helper sends nothing, using it during routine testing can send real messages, consume quotas, or incur charges without a live-operation warning or confirmation gate.

Content

No source excerpt is available for this finding.

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

Medium
Category
Output Handling
Confidence
92% confidence
Finding

The recommendation to persist complete raw Webhook JSON can unnecessarily retain sensitive financial or personal information across the supported transaction, settlement, complaint, and account events. Durable event capture can be legitimate, but the guidance supplies no minimization, access-control, or retention boundary for this payment-data store.

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

"req_date": "20220424", "req_seq_id": "20220424561166000", "huifu_id": "6666000111546360", "jump_url": "https://api.huifu.com/hostingh5/?jump_id=H20220424140825009124199014&huifu_id=6666000111546360" } }

text