Repository navigation
feat(pairing): sign in a Roku from the iPhone - #906
Conversation
A Roku on its server or sign-in screen advertises _silopair-roku._tcp and takes the pairing messages over plain TCP, since Roku sockets have no TLS. The phone browses both pairing types, lists each device once, dials a Roku without TLS, pushes it one server (a Roku keeps one), and shows its code alone on the confirm step. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (1)ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
The Evidence section describes the new flow but includes no captures or artifact link. Please attach or publish before-and-after captures of the nearby-TV card, single-server chooser and Roku code-confirmation screen on the affected iPhone, iPad and iPhone Duo layouts (folded/open), or explain any unaffected device. Include a short recording for the multi-step pairing flow. The stated Mac and Apple TV exclusions are clear. |
|
The Evidence section describes a device run but includes no screenshots, recording, or evidence link.
Please identify the build or commit for each capture and label the iPhone Duo captures as folded or open. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: a4ca135abb
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
| /// this gives up nothing: no pairing message carries a token, and the | ||
| /// code the person compares is what stops an impostor. | ||
| static func parameters(isRoku: Bool) -> NWParameters { | ||
| isRoku ? NWParameters(tls: nil, tcp: NWProtocolTCP.Options()) : tlsParameters() |
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Security: Authenticate the Roku pairing transport
When a user sets up a Roku while an attacker can proxy its LAN traffic, this raw-TCP path lets the proxy replace the pushed Silo URL with a fake server, start its own device request at the real server, and make the Roku display that request's user/match codes. The phone then approves those legitimate codes, so the comparison passes, while the attacker polls with the retained device code and receives the user's access/refresh tokens. Authenticate and integrity-protect the Roku channel (for example, with a displayed-code PAKE) before sending server details; the current post-start code check does not bind the receiver.
Useful? React with 👍 / 👎.
Problem
Related issue: N/A
Validation tasks: none
A new Roku can't be signed in from a phone the way an Apple TV or Android TV can. The Roku client now shows a "Use your phone" card on its server and sign-in screens (Silo-Server/silo-roku#6), but the iPhone never offers to sign it in. The Roku advertises
_silopair-roku._tcpinstead of_silopair._tcp, and it can't accept TLS. This change lets the iPhone find a Roku, sign it in, and check its code, just as it does for the other TVs.Approach
_silopair._tcpand_silopair-roku._tcpand shows them in one list. A device listed under both types appears once and keeps TLS.docs/companion-pairing.mdsection 2).device_platformofrokua Roku.The messages are the same pairing protocol. Apple TV and Android TV pairing don't change. iOS only; tvOS and macOS don't browse for TVs to pair.
Validation
Evidence
Surface and build: iPhone, Debug build from this branch, against a Roku Ultra on OS 16.0.4. A Roku appears in the nearby-TV card, the server chooser is single-select, and the copy says "a server". iPad uses the same card. Apple TV and Mac don't show this flow.
Risks
NSBonjourServicesgains_silopair-roku._tcp.Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Add Roku TV sign-in support to the iPhone pairing flow
DiscoveredTVcarries a newisRokuflag (defaults false), andFramedJSONSession<PairingMessage>.initgains an optional Roku argument; standard TV pairing paths are unchanged.Macroscope summarized a4ca135.