030611/dsh-telemetry-redactor ↗★ 1
dsh-telemetry-redactor
Export-copy redaction for DeepSeek Harness session telemetry
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:030611/dsh-telemetry-redactor说明文档
阅读完整 README ↗DSH Telemetry Redactor
English | 中文
dsh-telemetry-redactor 是一个最小 DeepSeek Harness Profile Bundle,在遥测后端收到记录之前脱敏敏感值。它挂载官方 session-telemetry/record waterfall,调用 next() 以保持其他部署规则可组合,并返回一份新的递归脱敏记录。
官方 telemetry coordinator 会在进入该 waterfall 之前深拷贝 canonical session event,并逐条隔离规则异常。因此本插件只改变外发副本,绝不改写权威 session log。本文中的 fail-closed 仅表示该 coordinator 丢弃一条失败的导出副本,同时 agent loop 继续运行;它不表示所有 telemetry 路径或 listener 顺序都不可绕过。
脱敏范围
- 高风险键名下的完整值,例如
authorization、cookie、credential、password、secret、token、apiKey、access_token、clientSecret与privateKey;键名本身包含已识别凭据模式时也会改写键名。 - 字符串中的 Bearer 与 Basic Authorization 值。
- 常见凭据形式,包括
sk-...、GitHub token、Slack token、JWT 三段式字符串,以及token=.../api_key: ...赋值。
插件先对键名分词再匹配,因此 inputTokens、output_tokens、tokenUsage、tokenCount、contextTokenCount 等遥测计数和 tokenizer 等普通字段会保留。脱敏是安全过滤器,不是对所有未知秘密格式均不泄漏的证明。精确支持与不支持边界见 SECRET-MATRIX.zh.md,信任边界见 SECURITY.md。
监听器以 prepend 方式注册,因此通常会包裹其前后挂载的部署规则,并脱敏这些规则的最终输出。若另一个插件刻意注册更外层的 prepended listener,仍可能在本插件之后加入内容;安全敏感部署必须审查完整 waterfall listener 集合。
安装
把公开包安装到选定的 DSH profile,然后检查最终配置:
dsh plugin --profile web add dsh-telemetry-redactor
dsh --profile web --dump-config
配置 dump 必须出现新增的 telemetry-redactor 行。本 bundle 不会添加、替换或启用 telemetry backend;它只保护部署已经选择的后端会处理的记录。