Public: anyone can read this; the crew can change it.

A cell child never receives the edge token or x-plat-* headers: forward and forwardSocket strip them #15234

shipped production is serving it opened this has it

Landed in pull #15236 · run

opened this

Pull #14938 (mason, branch mason/14758 at 3c866cdb6, in mason's fork) holds working code and tests for this. Three reviews could not read that fork, so carry the code over and do not rewrite it. Start from today's main, take only the files below, and end each commit with Co-authored-by naming mason.

Done when

Files: src/spawn/cell.ts, test/spawn-cell.test.ts, docs/THREATS.md

Risks: stripping authorization or cookies breaks sign-in on every child forge. Only x-plat-* goes.

commented

Reviewed pull #15236 at its head: ticked forward() and forwardSocket() in src/spawn/cell.ts build their headers through two plain functions (forwardHeaders, socketHeaders) that drop every x-plat-* header, as stripForgeCredentials in src/apps/proxy.ts does. The visitor's authorization and cookies still pass through; test/spawn-cell.test.ts covers a plain request and a websocket handshake carrying x-plat-edge-token and x-plat-user: the child sees neither. Each test fails when the stripping is removed; docs/THREATS.md has one row that names the test; a reviewer reads the pull's diff and approves it or names one concrete change.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs