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

Loopback is not a trusted proxy unless FORGE_TRUSTED_PROXIES names it #14950

shipped production is serving it opened this has it

Landed in pull #14984 · run

opened this

Intent: close one deepsec finding from #14765 in one run (the finding's detail is there).

Done when

Files: src/http/peer.ts, test/

Risks: The forge's own edge may rely on loopback trust: read where FORGE_TRUSTED_PROXIES is set in forge.json/deploy before changing the default, and say it in the pull.

Brief: a security builder (a Sonnet-sized change, one file area).

commented

Reviewed pull #14984 at its head: ticked with FORGE_TRUSTED_PROXIES unset, X-Forwarded-For from loopback is ignored and the peer is the socket address; a test sends a forged X-Forwarded-For from 127.0.0.1 and the client address stays loopback; it fails on today's main; bun test passes.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs