Three bugs, all found standing up a second rig on m3ultra:
1. SECURITY: HTTPServer(("", 8017)) bound 0.0.0.0 with no auth, and POST /save
base64-writes bytes to an absolute `dest` taken straight from the request body.
Anyone on the same wifi could write arbitrary files as this user — drop a
~/Library/LaunchAgents plist and you have code execution. It was live on ultra
(verified: `TCP *:8017 (LISTEN)`, 204 from 192.168.1.249). Now binds 127.0.0.1;
FLOW_BIND overrides for a tailnet IP (utun-routed, LAN still can't reach it).
2. The launchd "self-heal" never healed anything. launch.sh backgrounds the queue
server and exits; without AbandonProcessGroup launchd SIGKILLs the process group
on exit, so every 10-min tick started a server that died a second later. The
server that was actually up had been started by a manual ./launch.sh.
Verified after the fix: kill -> 000 -> kickstart -> 204 on a fresh pid.
3. launch.sh hard-coded "Brave Browser" in the osascript. The extension is loaded
into Chrome on m3ultra. FLOW_BROWSER now names it (default Brave, unchanged
for ultra); m3ultra's plist sets "Google Chrome".
Also chmod +x install.sh launch.sh (both had lost the bit).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>Label</key>
|
|
<string>games.monsterrobot.flowrinse</string>
|
|
|
|
<!-- sh -c so $HOME expands; launchd doesn't expand ~ in ProgramArguments -->
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>/bin/sh</string>
|
|
<string>-c</string>
|
|
<string>exec "$HOME/Library/Application Support/flowrinse/launch.sh"</string>
|
|
</array>
|
|
|
|
<key>EnvironmentVariables</key>
|
|
<dict>
|
|
<key>FLOW_URL</key>
|
|
<string>https://labs.google/fx/tools/flow/project/4085fe36-7540-4359-810f-12c69506f78d</string>
|
|
<key>PATH</key>
|
|
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
|
|
</dict>
|
|
|
|
<!-- launch.sh backgrounds the queue server, then exits. Without this key launchd
|
|
SIGKILLs the whole process group on exit, taking the server with it — the
|
|
"self-heal" then restarts a server that dies a second later, forever. The
|
|
server you had running was a MANUAL ./launch.sh; the agent never kept one up. -->
|
|
<key>AbandonProcessGroup</key>
|
|
<true/>
|
|
|
|
<!-- self-healing: idempotent launch.sh every 10 min (nc check + tab reuse
|
|
make repeat runs no-ops), so a dead server or closed tab comes back -->
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
<key>StartInterval</key>
|
|
<integer>600</integer>
|
|
|
|
<key>StandardOutPath</key>
|
|
<string>/tmp/flowrinse.launchd.log</string>
|
|
<key>StandardErrorPath</key>
|
|
<string>/tmp/flowrinse.launchd.log</string>
|
|
</dict>
|
|
</plist>
|