Restore Chrome loopback debugging and document accepted local risks
This commit is contained in:
@@ -10,3 +10,7 @@ Write rules only; omit incident histories and anecdotes.
|
||||
## Terminology
|
||||
|
||||
- Use “snapshot” for a point-in-time capture of code and conversation context; “revision” implies source control and changes the meaning.
|
||||
|
||||
## Security
|
||||
|
||||
- Accept other local OS accounts reaching preview forwards and Chrome’s loopback debugger on personal Macs; do not add authentication or account-isolating brokers for that threat.
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ byre never signs with a key on the machine it runs on. When a project checkout's
|
||||
- **Display sleep.** While the display sleeps, ScreenCaptureKit lists no displays. Every call holds a `PreventUserIdleDisplaySleep` assertion and, when the display is asleep, declares user activity and waits for ScreenCaptureKit to list it again. A declared activity doesn't reset the keyboard and mouse idle time, so the display sleeps again after powerd's grace period (`com.apple.powermanagement.delayDisplayOff` in `pmset -g assertions`), not after the full display-sleep delay. `pmset -g log` shows each wake as `Display is turned on` beside `byre-hands` assertions.
|
||||
- **Orion.** Orion ignores key events that carry only a Unicode string, so typing posts each ASCII character as its key code. Some apps list `confirm` but ignore it, Orion's address bar among them; send Return instead. `do JavaScript` needs Orion's Develop → "Allow JavaScript from Apple Events".
|
||||
- **Chrome.** Chrome refuses remote debugging on its default profile, so byre's Chrome is its own profile (`~/Library/Application Support/byre/chrome`), a separate Chrome beside any the human runs, and it keeps its logins: the human signs in there once. Chrome comes from `brew install --cask google-chrome`; macOS's "downloaded from the Internet" prompt on its first launch must be answered Open (or `osascript -e 'tell application "System Events" to tell process "CoreServicesUIAgent" to click button "Open" of window 1'`), and until it is, Chrome cannot accept debugging commands.
|
||||
- **Chrome's trust boundary.** Other OS accounts on the same Mac are not trusted with byre's logged-in browser. Chrome uses inherited debugging pipes, shared by agents through an owner-only Unix socket; never enable a debugging TCP port or fall back to one. After upgrading from the TCP transport, quit the old byre-profile Chrome once before using the tool; an already-running browser cannot acquire the new pipes. The saved profile and logins stay in place.
|
||||
- **Chrome's trust boundary.** Use Chrome's loopback debugging port with byre's separate persistent profile and Chrome's default browser-origin checks; never add `--remote-allow-origins=*`. Other local OS accounts can reach that debugger and control its logged-in sessions. This is an accepted risk on the personal Macs byre runs on, as is access to the app's local preview forwards; do not add account-isolating brokers for these listeners. Chrome must be launched with `--remote-debugging-port=0` so it records its port and browser WebSocket path in the profile’s `DevToolsActivePort` file. After switching from the pipe or fixed-port transport, quit the old byre-profile Chrome once so the next tool call can start it with that discovery file. The saved profile and logins stay in place.
|
||||
- **Permissions.** Agents' processes run as byre's descendants, so macOS privacy controls (TCC) hold byre responsible for them: the Screen Recording, Accessibility and Automation grants in System Settings → Privacy & Security are byre's, made by clicking at the Mac's screen, and each app scripted for the first time asks for its own Automation grant. Without Accessibility an untrusted process just sees no windows and no menu bar. Accessibility can list byre switched off; only its switch being on counts. TCC keys grants on the signing identifier and team, and every build is signed with Developer ID, so grants carry over from build to build. On a client Mac the grants belong to byre's app; `NSAppleEventsUsageDescription` in `mac/Info.plist` is what lets macOS ask for the Automation grant. `byre-hands check` prints the grants of the process that runs it; the Server and Settings tabs run it.
|
||||
|
||||
## Terminals
|
||||
|
||||
Reference in New Issue
Block a user