Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

🤖 fix: Daytona client buffers whole API responses without a size limit

Đang mở
#7,230 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
79/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ệ
node.js, typescript
Lĩnh vực
backend, security, testing

Hướng nghiên cứu

Start in src/node/services/daytona/daytonaClient.ts, around the fetchWithTimeout path near line 379, and trace how response bodies are read and transport errors are reported. Add a hard byte cap to streamed responses, abort when it is exceeded, and report the endpoint in the error. Add the described unit test with a fake fetch that streams beyond the cap; done when that test confirms the oversized response is rejected.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Follow-up from the Codex security review of #7100 (thread: https://github.com/coder/xum/pull/7100#discussion_r4353457236).

Problem

DaytonaClient (src/node/services/daytona/daytonaClient.ts, the fetchWithTimeout path around line 379) reads every Daytona API response with response.text() before it validates it, with no byte limit. The per-request timeout (15 s) bounds time, not size. The reconciler lists sandboxes every 60 s, so a malicious or compromised Daytona control plane (or a proxy in front of it) could return one very large /sandbox response and exhaust the memory of the desktop app or xum server.

Precondition: Daytona credentials are configured and the control plane or its HTTPS proxy is hostile.

Proposed fix

Read the body as a stream with a hard cap (a few MiB is far above any real list or config response), abort the request when the cap is exceeded, and report it as a transport error that names the endpoint. Add a unit test with a fake fetch that streams more than the cap.

Why it is deferred

#7100 runs its review loop under a P0/P1-only rule; P2 findings get a tracked follow-up.

Ngôn ngữ chính
TypeScript
Star
2.1k
Fork
139
Merge trung bình
3 giờ 41 phút
Pull request đã merge (30 ngày)
955

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của coder/xum

Tất cả issue của coder/xum

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.