fix(browser): default to openclaw profile when unspecified#32031
Conversation
🔒 Aisle Security AnalysisWe found 1 potential security issue(s) in this PR:
1. 🟡 Default profile now uses unauthenticated Chrome DevTools Protocol (CDP) endpoint (local privilege boundary bypass)
DescriptionThe default browser profile selection was changed to prefer the While the control server itself binds to loopback and has auth middleware, the Chrome CDP endpoint is not authenticated (Chrome’s remote debugging port has no built-in auth). With
Changed default selection (now prefers const defaultProfile = defaultProfileFromConfig ??
(profiles[DEFAULT_BROWSER_DEFAULT_PROFILE_NAME]
? DEFAULT_BROWSER_DEFAULT_PROFILE_NAME
: profiles[DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME]
? DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME
: "chrome");CDP is exposed via a listening port when launching Chrome: const args: string[] = [
`--remote-debugging-port=${profile.cdpPort}`,
// ...
];Notes on exposure:
RecommendationMitigate by ensuring the default path does not expose an unauthenticated CDP port, or by hardening how CDP is exposed:
const args = [
`--remote-debugging-port=${profile.cdpPort}`,
"--remote-debugging-address=127.0.0.1",
// ...
];
Analyzed PR: #32031 at commit Last updated on: 2026-03-02T19:10:17Z |
Greptile SummaryThis PR successfully changes the default browser profile from
Documentation gap: Multiple documentation files ( Minor code quality note: The default profile resolution logic (lines 269-273 in Confidence Score: 4/5
Last reviewed commit: a9a44ab |
a9a44ab to
84b7f35
Compare
84b7f35 to
4536357
Compare
|
Landed via temp rebase onto main.
Thanks @liuxiaopai-ai! |
Summary
Describe the problem and fix in 2–5 bullets:
browser.defaultProfileis not explicitly configured, browser routing defaulted tochrome(extension relay), causing desktop users without the relay extension to hit long relay timeouts.openclawwhen no explicit default is set.openclaw, while preserving explicitdefaultProfile: "chrome"behavior.chromeprofile is still available for explicit opt-in.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
profilenow default to managed standalone profile (openclaw) unless users explicitly setbrowser.defaultProfileto another profile (includingchrome).Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
browser.defaultProfileunsetSteps
browser.defaultProfile.Expected
openclawwhen unset.defaultProfile: "chrome"remains respected.Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
pnpm exec vitest run src/browser/config.test.ts src/browser/profiles-service.test.tspnpm lintpnpm tsgochromerelay profile still exists in resolved profilesdefaultProfile: "chrome"still overrides defaultCompatibility / Migration
Mostly)No)No)Failure Recovery (if this breaks)
browser.defaultProfile: "chrome"in config, or revert this PR commit.src/browser/constants.tssrc/browser/config.tssrc/browser/config.test.tsRisks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.chromerelay as default without settingbrowser.defaultProfilewill now route toopenclaw.browser.defaultProfile: "chrome"remains supported and is now the intended opt-in path for relay-first setups.