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

Every route that changes state refuses a request from another origin, proven by a test that walks the route table #14478

shipped production is serving it opened this has it

Landed in pull #14494 · run

opened this

Intent: No mutation can be forged from another site.

Done when:

Files: src/http/*.ts (route table, same-origin helper), test/same-origin-routes.test.ts

Risks: Webhook and token-bearing API routes are legitimately cross-origin; exempt them by name, never by pattern.

Suggested brief: torque (security brief). If this is already on main, decline naming the commits.

commented

Reviewed pull #14494 at its head: ticked A test lists every non-GET route registered in the HTTP layer and sends each a cross-origin request; each answers 403 or 401, none changes state; A route that lacks the check is fixed in the same pull, or named in the pull with why it is exempt (webhooks with signatures); The exemption list is one small file the test reads.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs