BF1007/BF1008 错误输出将带凭据的 URL 原样透传(scheme://user:pass@host),泄漏面覆盖三处:终端 ERROR 块、logs/commands/*.log、--format json 的 error.message 字段。首次出现:本版(botforge-win 1.0.3 升级测试)新发现。受影响安装场景:使用带凭据 git/代理 URL 的环境的 BF1007/BF1008 错误路径。实际影响:凭据经终端、日志文件、JSON 输出三通道泄漏,属安全问题;错误透传路径为通用代码,预计跨平台存在。建议对所有命令输出/错误消息/日志做 URL userinfo 脱敏。
scheme://user:pass@host
logs/commands/*.log
--format json
http://user:pass@host
botforge-win install minimal --yes
所有错误输出通道对 URL userinfo 脱敏(scheme://user:***@host)。
scheme://user:***@host
三通道均原样透传 scheme://user:pass@host,T4.01 实测泄漏 6 次(存档已脱敏 ***);T6.06 假凭据场景未复现(registry 热,未走到报错路径)。证据:T4.01/T6.06。T4.01(冷 registry + git 全局代理带凭据)实测输出(存档已脱敏):
bot-forge error Error code BF1007 ERROR command error: "cargo" "+1.89.0" "install" "rust-bot-hw" … "--index" "sparse+http://rust.inhuawei.com/crates.io-index/" … warning: spurious network error (3 tries remaining): [5] Could not resolve proxy name (Unsupported proxy syntax in 'http://b00938567:***@@proxy.huawei.com:8080': Bad hostname) warning: spurious network error (2 tries remaining): …同上… warning: spurious network error (1 try remaining): …同上… (上述 3 行 ×2 组,共 6 次凭据出现;同内容落盘 logs\commands\<epoch>-<pid>-<n>-rust-bot.log) error: download of config.json failed Caused by: [5] Could not resolve proxy name (Unsupported proxy syntax in 'http://b00938567:***@@proxy.huawei.com:8080': Bad hostname) exit=7
T6.06 假凭据复测(http://bfredact:bfpass123@proxy.invalid,仅 env 注入):BF1008(registry 热,未走网络路径),输出中假密码出现 0 次——泄漏路径以 T4.01 为准。
各平台确认:黄区 Windows x64 复现(T4.01 冷 registry 场景);热缓存场景(T6.06)未复现;错误透传路径为通用代码,预计跨平台存在。
--version
问题概述
BF1007/BF1008 错误输出将带凭据的 URL 原样透传(
scheme://user:pass@host),泄漏面覆盖三处:终端 ERROR 块、logs/commands/*.log、--format json的 error.message 字段。首次出现:本版(botforge-win 1.0.3 升级测试)新发现。受影响安装场景:使用带凭据 git/代理 URL 的环境的 BF1007/BF1008 错误路径。实际影响:凭据经终端、日志文件、JSON 输出三通道泄漏,属安全问题;错误透传路径为通用代码,预计跨平台存在。建议对所有命令输出/错误消息/日志做 URL userinfo 脱敏。影响范围
复现步骤
http://user:pass@host),registry 冷缓存botforge-win install minimal --yes(触发 BF1007/BF1008)--format jsonerror.message 中的 URL 形态预期结果
所有错误输出通道对 URL userinfo 脱敏(
scheme://user:***@host)。实际结果
三通道均原样透传
scheme://user:pass@host,T4.01 实测泄漏 6 次(存档已脱敏 ***);T6.06 假凭据场景未复现(registry 热,未走到报错路径)。证据:T4.01/T6.06。T4.01(冷 registry + git 全局代理带凭据)实测输出(存档已脱敏):T6.06 假凭据复测(http://bfredact:bfpass123@proxy.invalid,仅 env 注入):BF1008(registry 热,未走网络路径),输出中假密码出现 0 次——泄漏路径以 T4.01 为准。
各平台确认:黄区 Windows x64 复现(T4.01 冷 registry 场景);热缓存场景(T6.06)未复现;错误透传路径为通用代码,预计跨平台存在。
运行环境与供应信息
--version自报 1.0.1)安全、性能与恢复证据
附件与提交确认