🤖 fix: Daytona client buffers whole API responses without a size limit
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
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
- Đọ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 coder/xum
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
coder/xum#7733 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
🤖 tests: lock in git status outgoing-count rename equivalence and clarify index-lock commentĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Slaymish/HealthAgent#7 ·
-
area: engine topic: math type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Get-Concord-AI/concord-mcp#310 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Correct install_claude: 'marketplace add' over a different source is refused, not replaced in placeĐang mởtype:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
nightgauge/nightgauge#2804 ·
Maintainer thường phản hồi trong vòng 1 ngày