Skip to content

fix(security): redact credentials and CDN secrets from logs - #256

Open
lmwacn wants to merge 1 commit into
Tencent:mainfrom
lmwacn:fix/redact-sensitive-logs
Open

lmwacn wants to merge 1 commit into
Tencent:mainfrom
lmwacn:fix/redact-sensitive-logs

Conversation

@lmwacn

@lmwacn lmwacn commented Aug 13, 2026

Copy link
Copy Markdown

Summary

  • recursively redact sensitive credential and CDN fields in JSON bodies, including nested objects and token arrays
  • redact QR status responses, signed CDN URLs, CDN error bodies, and malformed AES key diagnostics
  • avoid logging partial encrypted query parameters and sanitize non-success HTTP response errors
  • add regression tests for structured, malformed, and CDN-related sensitive data, plus close existing branch-coverage gaps

Verification

  • npm test -- --reporter=dot — 408 tests passed, branch coverage 90.12%
  • npm run typecheck
  • npm run build
  • git diff --check

@NewFuture

Copy link
Copy Markdown

感谢这份覆盖面很广的隐私加固方案。社区维护版没有直接复制该补丁,但已基于当前架构独立完成更完整的诊断脱敏,并随 npm openclaw-weixin@3.1.6 发布:

默认日志现在不保留 payload、查询参数、二维码 URL、原始路径或任意异常文本;同时保留原始功能错误传播。实现还覆盖了本 PR 未处理的非 JSON 响应内容和异常文本中携带签名 URL 的边界。

这是社区版的独立发布状态更新,不表示本 PR 已在腾讯官方仓合并。社区会保留本 PR 的问题背景与作者归属:
NewFuture/openclaw-weixin#83
NewFuture/openclaw-weixin#84
NewFuture/openclaw-weixin#85
https://www.npmjs.com/package/openclaw-weixin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants