[PR #74] feat: 添加 sensitive-logs feature flag 控制敏感日志输出 #39

Open
opened 2026-03-07 21:46:48 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/hank9999/kiro.rs/pull/74

State: open
Merged: No


动机

生产环境中 tracing::debug 输出完整 Kiro 请求体可能泄露用户对话内容。

实现

  • Cargo.toml 中添加 sensitive-logs feature flag
  • 默认不输出完整请求体(仅记录字节数)
  • 启用 feature 后才输出完整内容
# 调试构建
cargo build --features sensitive-logs

改动范围

  • Cargo.toml: 添加 feature 定义
  • src/anthropic/handlers.rs: 2 处请求体日志改为条件编译
**Original Pull Request:** https://github.com/hank9999/kiro.rs/pull/74 **State:** open **Merged:** No --- ## 动机 生产环境中 `tracing::debug` 输出完整 Kiro 请求体可能泄露用户对话内容。 ## 实现 - 在 `Cargo.toml` 中添加 `sensitive-logs` feature flag - 默认不输出完整请求体(仅记录字节数) - 启用 feature 后才输出完整内容 ```bash # 调试构建 cargo build --features sensitive-logs ``` ## 改动范围 - `Cargo.toml`: 添加 feature 定义 - `src/anthropic/handlers.rs`: 2 处请求体日志改为条件编译
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/kiro.rs#39
No description provided.