[bug] Session traces persist API credentials in plaintext headers
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- security
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 850
- Fork
- 62
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 48
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của stepfun-ai/Step-Code
-
area/build bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stepfun-ai/Step-Code#190 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/tools bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stepfun-ai/Step-Code#186 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/tools bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stepfun-ai/Step-Code#185 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/tools bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stepfun-ai/Step-Code#184 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stepfun-ai/Step-Code#179 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của stepfun-ai/Step-Code
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
xdjs/MusicNerdWeb#1532 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
sebastian-software/ardo#352 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
@react95/core good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 3 ngày
-
@shikijs/stream: `ShikiStreamTokenizer.clone()` shares its `tokensStable` array with the originalCó thể đã có người làm @xyrolle đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 6 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày