fix(cli): require auth for allow everything endpoint - #11887
Conversation
| if (await KiloTuiThreadDaemon.attach({ args, cwd, input: () => input(args.prompt), start })) return | ||
| // kilocode_change end | ||
| // kilocode_change start - protect TUI-owned HTTP routes from unauthenticated local callers | ||
| const password = Flag.KILO_SERVER_PASSWORD ?? randomUUID() |
There was a problem hiding this comment.
SUGGESTION: Consider moving this auth-header logic into the Kilo mirror module
This block (password/username/header derivation, plus the KILO_SERVER_USERNAME/KILO_SERVER_PASSWORD env additions and the four scattered headers, insertions below in this same shared upstream file) touches packages/opencode/src/cli/cmd/tui/thread.ts in ~7 separate spots. Since this file already has a Kilo mirror (src/kilocode/cli/cmd/tui/thread.ts, imported above as KiloTuiThreadDaemon), the auth derivation could live there as a single helper (e.g. KiloTuiThreadDaemon.workerAuth()) and be called with one kilocode_change-marked line here, reducing the diff surface against upstream opencode.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 1 Issue Found | Recommendation: Merge (minor suggestion) Overview
Issue Details (click to expand)SUGGESTION
Verified the core security fix: Files Reviewed (8 files)
Fix these issues in Kilo Cloud Reviewed by claude-sonnet-5-20260630 · Input: 110 · Output: 30.2K · Cached: 5.8M Review guidance: REVIEW.md from base branch |
…rything-auth fix(cli): require auth for allow everything endpoint
What
Require authentication for the high-risk
/permission/allow-everythingendpoint even when the rest of a standalone server is running without global auth.Why
allow-everythingpersists wildcard permission approvals. Leaving it callable on unauthenticated localhost servers made it reachable by local scripts and browser-origin attempts that could discover the server port.Notes
kilopassword, and legacy fixed-password daemons are restarted.kilo serveremains otherwise optional-auth, but this endpoint fails closed without configured credentials.