AGENT SKILL
log-capture
将第 2 跳和第 3 跳的响应以两份结构化日志保存,并对敏感数据做脱敏。
- License 许可
- Apache-2.0
- 最近更新
- 2026-03-24
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- log-capture
- description
- 将第 2 跳和第 3 跳的响应以两份结构化日志保存,并对敏感数据做脱敏。
03 SKILL.md 正文
本技能负责把 req2/res2 与 req3/res3 分别输出到两份日志文档中。日志目标是复盘与对比,不是原样扩散敏感响应。
日志文件建议:
- logs/req2-res2.log
- logs/req3-res3.log
每份日志推荐分段:
- metadata
- timestamp
- source_sample
- authorization_scope
- session_id 或 correlation_id(若无则标记 unknown)
- request_summary
- method
- url_path 或 endpoint
- host
- content_type
- 关键业务字段摘要
- 已脱敏的动态值
- response_summary
- http_status
- content_type
- success/failure 结论
- 关键业务对象摘要
- consistency_notes
- 与前序步骤是否一致
- 是否存在跨会话拼接风险
脱敏规则:
- 邮箱:保留首字母与域名主干,其余替换。
- 姓名:仅保留首字符。
- tracking_id、resume_token、customer id、payment intent id、payment method id、charge id、request id、client_secret:保留前 6 到 8 个字符和后 4 个字符,中间用 ***。
- 卡号、cvc、完整到期日:不得写入日志;若样本中出现,记录为 redacted。
req2-res2 日志关注字段:
- req2:action、feed_id、form_id、tracking_id、payment_method、nonce 来源说明、hash 来源说明、version_hash 来源说明。
- res2:success、is_valid、is_spam、resume_token、tracking_id、intent.id、intent.status、intent.amount、intent.currency、total。
req3-res3 日志关注字段:
- req3:payment_intent id、return_url 中 resume_token/feed_id/form_id/tracking_id、expected_payment_method_type、client_context、key 是否为 publishable key、client_secret 是否与上一步一致。
- res3:HTTP 402、error.code、decline_code、message、payment_intent.status、last_payment_error.type。
额外要求:
- 若 req3 与 req2 不一致,req3-res3.log 顶部要加 session_consistency=fail。
- 日志应使用“字段: 值”或 JSON 行风格,便于后续机器处理。
- 只保留排障必要信息,不保留可被再次利用的完整凭据。
04 同仓库更多 Skills
stripe-confirm
使用 Stripe 参数确认支付并判定成功、拒付或 3DS 挑战结果。
★ 4
payment-intent
向带签名的 donateUrl 提交捐赠请求并获取 Stripe 支付意图信息。
★ 4
form-view
请求 donation-form-view 并解析支付表单元数据。
★ 4
discovery
访问 donate 入口页并提取后续流程所需的基础参数。
★ 4
wp-donate
分析并执行 donate 平台从入口页到 Stripe 确认支付的完整流程。
★ 4
request-sequence
执行捐赠流程的三个顺序 HTTP 请求
★ 4