Make relay blindness proof deterministic - #47
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ftw-webapp | eb01a4a | Commit Preview URL Branch Preview URL |
Aug 12 2026, 12:34 PM |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb01a4af78
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (const s of KNOWN_STRINGS) { | ||
| const bytes = new TextEncoder().encode(s) | ||
| const occurrences = countBytes(dump, bytes) | ||
| if (occurrences >= (bytes.length >= MIN_NEEDLE_BYTES ? 1 : 2)) found.push(`string:${s}`) |
There was a problem hiding this comment.
Keep single plaintext frames detectable
When only one control frame is exposed—for example, a normal { t: 'tick' } or { t: 'delta' } frame—its known protocol word occurs once and is shorter than eight bytes, while its ordinary CBOR integers are also filtered out, so leaks() returns no finding. The positive control now conceals this false negative by concatenating the same frame twice; a relay regression that logs, retains, or otherwise exposes one decrypted frame would therefore pass this security proof.
Useful? React with 👍 / 👎.
Summary
snapandtickThis is CI-only and does not need a changeset.
Verification
npx vitest run tests/relay-blindness.test.ts tests/end-to-end-encrypted.test.ts(17 passed)npm run verify(865 passed, 1 skipped)npm run checkafter the final detector control assertion