[bug] Session traces persist API credentials in plaintext headers
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- security
调研方向
Start at buildTraceRecord and cloneRequestHeaders, then inspect FetchHttpTransport and SessionTraceStore, using the isolated production-transport regression test described in the issue. Verify that persisted trace JSON redacts authorization, x-api-key, and response cookies across header casing, response status, and streaming mode while credentials still reach the endpoint.
由索引模型根据 Issue 内容生成。
描述
Version and environment
main at 87c344501f5960cda6bf9f47eec5af0a4664cdba (1.0.0), Node.js 26.8.1, macOS 26.5.2 arm64.
Reproduction
- Create a
FetchHttpTransportwith a realSessionTraceStoretargeting a temporary storage root. - Send a request with complete trace metadata and dummy
authorization: Bearer fake-key-for-regression-only/x-api-key: fake-anthropic-keyheaders. Mock only the fetch response; do not use real credentials or call a model endpoint. - Read the generated
sessions/s1/trace/span1.json. - Both dummy credentials appear verbatim in
request.headers.
Expected behavior
Authentication credentials should reach the model endpoint but be redacted from persisted diagnostic headers, regardless of header-name casing, response status, or streaming mode.
Actual behavior and cause
buildTraceRecord copies request headers with cloneRequestHeaders without redaction. OpenAI-compatible requests contain a bearer token and Anthropic requests contain x-api-key. Session tracing is enabled by default in BUILTIN_CLI_DEFAULTS.
Trace files use mode 0600, so this is not a claim of unauthenticated remote access. The problem is that diagnostic files contain reusable API credentials and can disclose them if copied or shared. Response cookies should likewise be redacted from trace headers.
Verification
An isolated regression test using the production transport and filesystem trace store fails on current main because the saved JSON contains the dummy credential.
- Searched existing issues and PRs for duplicates.
- Read CONTRIBUTING.md.
- 主要语言
- TypeScript
- 星标
- 654
- 派生
- 55
- 平均合并
- 1 天 20 小时
- 30 天内合并 PR
- 33
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
stepfun-ai/Step-Code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
stepfun-ai/Step-Code#218 ·
维护者通常 1 天内回复
-
area/build bug
难度 2/5 1-3 小时 新手友好度 75/100
stepfun-ai/Step-Code#190 · 2 条评论 ·
维护者通常 1 天内回复
-
area/tools bug
难度 2/5 1-3 小时 新手友好度 75/100
stepfun-ai/Step-Code#186 · 1 条评论 ·
维护者通常 1 天内回复
-
area/tools bug
难度 2/5 1-3 小时 新手友好度 75/100
stepfun-ai/Step-Code#185 · 1 条评论 ·
维护者通常 1 天内回复
-
area/tools bug
难度 2/5 1-3 小时 新手友好度 75/100
stepfun-ai/Step-Code#184 · 1 条评论 ·
维护者通常 1 天内回复
查看 stepfun-ai/Step-Code 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
难度 2/5 1-3 小时 新手友好度 72/100
openclaw/openclaw#168089 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
✨ enhancement needs-discussion
难度 1/5 1 小时以内 新手友好度 85/100
-
[Bug]: [MCP/CLI] Bare loopback IP addresses (127.0.0.1:port) and hosts with ports fail to navigate due to erroneous scheme inference可能已有人在做 @alok-108 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/playwright#43263 ·
维护者通常 1 天内回复
-
area:studio type:security
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复