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

Aperta Adatta ai principianti
#235 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
73/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Leggi modules/mail/worker/filing.ts e modules/mail/worker/lib/tools.ts per seguire come raw_headers arriva alle risposte degli strumenti, quindi esamina i due test e i documenti menzionati. Decidi quale comportamento documentato è quello previsto, aggiorna i test in modo che includano una voce Authentication-Results e assicurati che i test verifichino il comportamento scelto e che i documenti siano coerenti con esso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
TypeScript
Stelle
1
Fork
1
Merge medio
9h 3m
PR unite (30g)
136

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudhal-dev/podbay

Tutte le issue di cloudhal-dev/podbay

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.