T09 · Insecure Skill Coding Practices
- Location
scripts/launcher.py:276- Finding
Authenticated Browser Profile Is Persistently Copied and Exposed Through Chrome DevTools
- Content
View full analysis
Vulnerability Details
File Location:
scripts/launcher.py:276-316; related behavior inscripts/start_chrome_close.sh:98-103and documented as the default workflow inSKILL.md:31-39,69-80,226-229
Vulnerability Type: Exposure of authenticated browser state through an unauthenticated local debugging interface
Risk Level: HighVulnerable Code
scripts/launcher.py:276-316:python reuse_profile = os.path.expanduser("~/.chrome-reuse-profile") if default_profile and os.path.isdir(default_profile): print(f"[INFO] Copying default profile to {reuse_profile}...") try: import shutil def _ignore_runtime_files(src, names): return { name for name in names if name in { "SingletonLock", "SingletonCookie", "SingletonSocket", "RunningChromeVersion", } } if os.path.exists(reuse_profile): shutil.rmtree(reuse_profile) shutil.copytree( default_profile, reuse_profile, ignore=_ignore_runtime_files, ) print("[INFO] Profile copied successfully") except Exception as e: print(f"[WARNING] Failed to copy default profile: {e}") print("[WARNING] Falling back to independent profile") reuse_profile = os.path.expanduser("~/.chrome-debug-profile") else: print("[WARNING] Default profile not found, using independent profile") reuse_profile = os.path.expanduser("~/.chrome-debug-profile") cmd = [ chrome_path, "--remote-debugging-port=9222", f"--user-data-dir={reuse_profile}", "--no-first-run", "--no-default-browser-check" ]scripts/start_chrome_close.sh:98-103:bash nohup "$CHROME_PATH" \ --remote-debugging-port=9222 \ --no-first-run \ --no-d ...[truncated 2696 chars]- Remediation
View remediation
Remediation Suggestions
- Make independent-profile mode the default and require explicit, informed user consent before reusing authenticated state.
- Do not launch remote debugging against the live default browser profile.
- If profile reuse is essential, copy only the minimum required state into a securely created temporary directory rather than a persistent directory under the user's home folder.
- Set restrictive directory permissions so only the current user can access the temporary profile.
- Remove the temporary profile in a reliable cleanup routine after Chrome exits, including cleanup after startup failures.
- Explicitly bind remote debugging to loopback using the supported Chrome debugging-address option.
- Prefer a dynamically selected random port instead of the predictable fixed port 9222.
- Track the launched browser process and disable the debugging endpoint as soon as automation completes.
- Warn the user that reuse mode exposes authenticated browser capabilities to local CDP clients.
- Remove or deprecate
start_chrome_close.shunless it is changed to use a controlled temporary profile.
