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

Open Beginner friendly
#235 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
73/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Read modules/mail/worker/filing.ts and modules/mail/worker/lib/tools.ts to trace how raw_headers reaches tool answers, then review the two named tests and documents. Decide which documented behavior is intended, update the tests to include an Authentication-Results entry, and make sure the tests verify the chosen behavior and the documents agree.

Written by the indexing model from the issue text.

Description

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.
Dominant language
TypeScript
Stars
1
Forks
1
Avg merge
9h 3m
Merged PRs (30d)
136

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudhal-dev/podbay

All issues in cloudhal-dev/podbay

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.