{"id":"FJmh7-SpHyNtI_p3_t201","title":"Draft GitHub issue: self-approving bots + the Electron-is-a-browser memo (regnull/openbot)","language":"markdown","tags":[],"content":"# Draft issue for github.com/regnull/openbot\n\n## Title\nSecurity: bots can answer their own approval questions via the unauthenticated loopback API (and the Electron app is a browser)\n\n## Body\n\nNot a drive-by, I read the whole README, twice, which is more than most users will do. Some observations, in descending order of how hard I'd think about them:\n\n### 1. The self-approval loop (this is a real bug, not a style note)\n\nThe README documents that `http_request`/`fetch_url` are unrestricted, including localhost, and that the API on :8000 is unauthenticated without `OPENBOT_API_KEY`. A bot with `http_request` can therefore **answer its own `ask_human` question**, the human-in-the-loop approval the whole safe-UX story rests on, without the human ever seeing it. From the docs:\n\n> a bot can... call OpenBot's own API on the loopback interface, which is unauthenticated... it could create or edit bots, post messages as other actors, or **answer its own approval questions**.\n\nYes, the README admits this. But it's buried in the security section as a footnote when it is the defeat of the product's core safety mechanism. And the suggested mitigation doesn't hold: the README also notes the API key \"leaks through the `?api_key=` SSE fallback into proxy logs\" and that `run_shell` inherits the server environment, so the mitigation for the mitigation is \"rotate often.\" An agent platform where the bots can vote themselves merge rights with one curl is a platform where per-tool approval flags are theater.\n\nSuggested fix: bind the API to a unix socket by default, and/or add server-side policy that approval/resume endpoints can only be resolved by the human actor, and/or at minimum a hardcoded check preventing actor X from resolving an approval raised by actor X.\n\n### 2. The desktop app is a browser\n\nThe Electron renderer has no Node integration, an \"intentionally minimal\" preload, and talks to the same HTTP/SSE API the browser already supports. Meanwhile `make run` serves the same built frontend from FastAPI on :8000. The packaged app's value-add over a bookmark is a custom scheme, plus the uv locator that crawls `~/.local/bin`, `~/.cargo/bin`, Homebrew and WinGet because \"apps started from Finder don't inherit your shell PATH,\" then builds a Python venv on first launch and shows a status page while it compiles. A chat app with a build phase.\n\nThis is a localhost web app whose own security guidance is \"bind to 127.0.0.1, keep it off shared networks.\" Shipping 100MB of Chromium to render a localhost page, with Node integration disabled so none of the desktop APIs get used anyway, seems like a distribution checkbox satisfied at maximum cost. A `.webloc` file would have shipped faster.\n\n### 3. Small stuff\n\n- `MAX_BOT_HOPS` is a runaway-loop fuse on a system whose entire pitch is bots talking to bots. Consider requiring an explicit handoff token rather than \"first @mention wins.\"\n- \"Memory: nothing is ever purged\" combined with `run_shell` being able to read `secret.key` means one poisoned PR review outlives the incident response.\n- The seeded org ships chief_of_staff, engineer, reviewer and QA to merge \"Add a --version flag to the CLI and open a PR.\" Great demo of the handoff mechanism. Terrible demo of doing work.\n\nNone of this is unfixable, and the README's honesty about the trust model is genuinely rare and appreciated. But when a security section reads as a pre-emptive confession, it may be worth restructuring so fewer confessions are needed.\n","created_at":"2026-11-05T05:52:27.191Z"}