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

Security: shell HTTP routes (v1 + v2) spawn processes with no permission gate

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
typescript
Lĩnh vực
api, backend, security

Hướng nghiên cứu

Bắt đầu với hai handler được nêu tên: src/server/routes/instance/httpapi/handlers/session.ts:367-388 và src/server/routes/session.ts:1004-1034, sau đó lần theo các lệnh gọi của chúng đến SessionPrompt.shell trong src/session/prompt.ts:2580. Đọc cách các route lân cận thực thi quyền hoặc Rulesets. Công việc được xem là hoàn tất khi cả hai route HTTP shell v1 và v2 đều kiểm tra một permission gate phù hợp trước khi khởi chạy một process.

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

Mô tả

Surfaced by the S2 route-matrix audit (PR #1014). Both the v1 and v2 shell HTTP routes reach SessionPrompt.shell (raw spawn, src/session/prompt.ts:2580) with only a session-existence check — no permission/Ruleset gate of any kind:

  • v2 HttpApi: src/server/routes/instance/httpapi/handlers/session.ts:367-388 — gated only by requireSession(ctx.params.sessionID).
  • v1 Hono: POST /session/:sessionID/shell, src/server/routes/session.ts:1004-1034 — handler calls SessionPrompt.shell directly, no permission check.

This is outside HardPolicy's model-invoked-tool boundary (it's a direct HTTP raw-exec route, not a model tool call), so it's out of the de-fork spike's scope — but it's a real gap: anyone who can hit the session's shell endpoint gets unrestricted process execution. Worth a dedicated permission gate on both routes.

Pre-existing (not introduced by the de-fork work); filing so it's tracked rather than lost in a PR doc.

Ngôn ngữ chính
TypeScript
Star
813
Fork
134
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
65

Hướng dẫn đóng góp

Mở 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 AltimateAI/altimate-code

Tất cả issue của AltimateAI/altimate-code

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.