Tool answers carry every Authentication-Results field through raw_headers; the tests that say otherwise do not test it

Đang mở Phù hợp với người mới
#235 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
73/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

Hướng nghiên cứu

Đọc modules/mail/worker/filing.ts và modules/mail/worker/lib/tools.ts để theo dõi cách raw_headers được đưa vào câu trả lời của công cụ, sau đó xem lại hai bài kiểm thử và tài liệu được nêu. Quyết định hành vi nào được mô tả trong tài liệu là chủ đích, cập nhật các bài kiểm thử để bao gồm một mục Authentication-Results, đồng thời đảm bảo các bài kiểm thử xác minh hành vi đã chọn và tài liệu nhất quán với hành vi đó.

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

Mô tả

Found by the security review of the change that shows the platform's authentication statement (#28, pull request #233). This was already there before that change.

A message's raw_headers is the list of header fields the parser found (JSON.stringify(parsed.headers) in modules/mail/worker/filing.ts), and it is a named field of the tools' answers (modules/mail/worker/lib/tools.ts). So get_email over MCP, and the assistant, receive every Authentication-Results field, the platform's and any a sender forged, with nothing to tell them apart. A model or a client can take a forged field for the platform's statement.

No access is widened: a key already needs the right to read that mailbox, and ADR-0015 decision 21 keeps raw_headers on purpose. But two tests claim the platform's field is not in a tool's answer, and pass without testing it, because their fixtures seed raw_headers without the field:

  • test/workerd-agent/mcp.test.ts: seeded '[]', asserted absent.
  • test/unit/agent-no-send.test.ts: the same.

Two documents say the same: .claude/skills/podbay-security/SKILL.md ("no tool returns … what the platform said about its authentication") and docs/status.md ("nor the platform's field").

Done when

  • A decision: either the tools leave authentication-results out of raw_headers, or the documents say that the field's raw text travels there like any other header and only the platform's parsed statement is kept out.
  • The fixtures give raw_headers a real Authentication-Results entry, so the assertion tests something and fails without the control.
Ngôn ngữ chính
TypeScript
Star
1
Fork
1
Merge trung bình
9 giờ 3 phút
Pull request đã merge (30 ngày)
136

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

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 cloudhal-dev/podbay

Tất cả issue của cloudhal-dev/podbay

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.