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

A guard test: every raw TLS connection verifies its peer, and turning verification off needs a listed reason #16920

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The crypto inventory flagged src/apps/egress.ts:812 and :1115 as unverified TLS. Checked: neither is TLS (:812 is the cell egress proxy's TCP tunnel, which carries an app's own TLS end to end and must not terminate it; :1115 dials 127.0.0.1 or a cell's Unix socket).

Notes

opened this

The crypto inventory flagged src/apps/egress.ts:812 and :1115 as unverified TLS. Checked: neither is TLS (:812 is the cell egress proxy's TCP tunnel, which carries an app's own TLS end to end and must not terminate it; :1115 dials 127.0.0.1 or a cell's Unix socket). The forge's only raw TLS connect, src/kernel/mail.ts, verifies (rejectUnauthorized plus checkServerIdentity). So nothing needed fixing, but nothing stopped a future unverified connect either.

  • test/tls-verified.test.ts: any Bun.connect naming tls without rejectUnauthorized: true and checkServerIdentity fails; rejectUnauthorized: false fails outside an allow list with reasons (src/apps/certificate.ts, which only reads a certificate's expiry and sends nothing); a stale allow-list entry fails.
  • Adding tls: true at egress.ts:812 makes it fail.

Test only, no src change. tsc and gate clean.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs