fix(cli): protect Windows browser credential handoff [skip ci]

Windows browser dispatch can expose bootstrap credentials through BROWSER or native handler command arguments. Send the URL to an isolated helper over stdin and open an owner-only ACL-protected redirect file instead, with no raw-URL fallback.

Keep file ownership and bounded cleanup independent of CLI exit, reject unsafe storage, and cover shared callers, native API contracts, error paths and lifecycle regressions. Document the intentional Windows compatibility tightening; native Windows browser and ACL verification remains pending.
This commit is contained in:
Xubin Ren committed 2026-09-08 10:04:15 +08:00
1 parent 29bf9f9ca7
commit b373a95f5c
4 files changed
+898

No files matched your search

+4
View File
@@ -67,6 +67,10 @@ def _launch_browser(url: str) -> bool:
"""Open *url* and request a foreground browser window."""
if sys.platform == "darwin":
return _launch_macos_browser(url)
if sys.platform == "win32":
from nanobot.cli.windows_browser import launch_browser
return launch_browser(url)
return bool(webbrowser.open(url, new=2, autoraise=True))