File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646- ` docs/CHANGELOG.md ` 补充此次日志隐私修复说明。
4747
4848## Implementation
49- - 已在 [ src/analyzer.py] ( src/analyzer.py ) 收口 LLM 内容预览日志:默认只保留模型、长度和耗时等非正文信息;仅在显式调试开关下输出单行、脱敏、截断后的 preview。
49+ - 已在 [ src/analyzer.py] ( src/analyzer.py ) 收口 LLM 内容预览日志:默认只保留模型、长度和耗时等非正文信息;仅在显式调试开关下输出单行、脱敏、截断后的 preview,并覆盖 ` clientSecret ` 、 ` accessToken ` 这类 camelCase 凭据键 。
5050- 已在 [ src/logging_config.py] ( src/logging_config.py ) 增加进程级敏感预览开关,并限制为 ` setup_logging(debug=True) ` 才显式开启。
51- - 已新增 [ tests/test_analyzer_logging.py] ( tests/test_analyzer_logging.py ) 回归覆盖,验证默认模式不落预览、调试模式只落受控预览,以及常见敏感字段脱敏逻辑 。
51+ - 已新增 [ tests/test_analyzer_logging.py] ( tests/test_analyzer_logging.py ) 回归覆盖,验证默认模式不落预览、调试模式只落受控预览,以及 snake_case / camelCase 常见敏感字段脱敏逻辑 。
5252- 已更新 [ docs/CHANGELOG.md] ( docs/CHANGELOG.md ) 记录 ` #877 ` 的日志隐私修复说明。
5353- README 未改:本次属于日志隐私修复,用户可见说明已落在 ` docs/CHANGELOG.md ` ,无需重复扩写入门文档。
5454
Original file line number Diff line number Diff line change @@ -315,6 +315,8 @@ def test_sanitize_llm_log_preview_redacts_provider_prefixed_api_key_json_fields(
315315 ('{"client_secret":"abc123"}' , '{"client_secret":"[REDACTED]"}' ),
316316 ('{"clientSecret":"abc123"}' , '{"clientSecret":"[REDACTED]"}' ),
317317 ('{"accessToken":"abc123"}' , '{"accessToken":"[REDACTED]"}' ),
318+ ("clientSecret=abc123" , "clientSecret=[REDACTED]" ),
319+ ("accessToken=abc123" , "accessToken=[REDACTED]" ),
318320 ],
319321)
320322def test_sanitize_llm_log_preview_redacts_secret_and_token_fields (raw_preview , expected_preview ):
You can’t perform that action at this time.
0 commit comments