wigolo icon indicating copy to clipboard operation
wigolo copied to clipboard

Chrome profile copy left unused

Open evandariel opened this issue 4 months ago • 4 comments

What happened?

An opt-in env var (WIGOLO_CHROME_PROFILE_PATH, meant for authenticated fetches) copies your entire actual Chrome profile - cookies, saved logins, history - to a temp folder, and that copy is never used by the code that's supposed to consume it (dead code path) and never cleaned up. privacy leak, but only if you deliberately set that specific variable since default install never touches it. WIGOLO_CDP_URL with self launched chrome works.

I didn't experience this bug, claude code found it while I had it check it before installing, just FYI.

Command / tool call

No response

wigolo version

0.1.43-beta.0

OS + Node version

win11

Output of npx wigolo doctor (if relevant)


Logs / error output


evandariel avatar Jul 13 '26 01:07 evandariel

I reviewed the reported path and confirmed that WIGOLO_CHROME_PROFILE_PATH creates a temporary copy of the Chrome user-data directory, but the resulting userDataDir is not consumed by the browser-fetch path. The temporary copy is also not removed.

I can prepare a fix. My proposed approach is to preserve the opt-in profile-auth feature: launch a dedicated persistent Chromium context from the copied profile, use it for the authenticated request, then close the context and delete the temporary directory in finally, including failure and abort paths.

I would add regression coverage proving that the copied profile is used and always cleaned up.

Before I start, can a maintainer confirm whether this is the intended direction, or whether WIGOLO_CHROME_PROFILE_PATH should instead be removed in favor of CDP/storage-state authentication?

Faiyajz avatar Jul 17 '26 17:07 Faiyajz

Thanks @evandariel for opening this issue, and @Faiyajz for the additional input.

We have some major improvements coming soon, and I'll update this thread as soon as I can confirm whether this will be covered as part of those changes.

I also noticed @josephkehan-prog is already working on a PR for this—thanks for jumping in! I'll review everything as soon as possible.

Really appreciate everyone's contributions and feedback.

KnockOutEZ avatar Jul 19 '26 06:07 KnockOutEZ

Hi @evandariel — thank you for taking the time to open this, and sorry for the slow response.

I've been heads-down building some pretty big features and improvements for wigolo, and as a solo dev, shipping that while also triaging and maintaining every issue and PR has been genuinely hard. This isn't forgotten — it just hasn't had the attention it deserves yet.

I'd really appreciate your patience here. I'm going to go through the open issues and PRs properly over the next few weeks (sooner if I can free up), and I'll follow up right here.

In the meantime, the wigolo Discord is open if you'd like to follow what's being built, ask questions, or nudge me directly: https://discord.gg/BkUUgz2bNF

Thanks again for raising this, and for understanding — it genuinely means a lot. 🙏

KnockOutEZ avatar Sep 11 '26 07:09 KnockOutEZ

Pickup notes (confirmed on main; this is also a privacy cleanup):

  • src/fetch/auth.ts copies the whole chromeProfilePath into a mkdtempSync('wigolo-chrome-') directory on every call and returns { userDataDir }.
  • src/fetch/browser-pool.ts only uses userDataDir as a gate (≈L624) and never launches with it. So the copy (cookies and all) is unused and never deleted.
  • Pick one:
    1. Make it work: launch a persistent context from the copy (chromium.launchPersistentContext(userDataDir, …)) for that fetch, and rmSync(dir, { recursive: true, force: true }) in a finally. Copy once per process, not once per fetch.
    2. Remove it: drop chromeProfilePath and point users at WIGOLO_AUTH_STATE_PATH (#526), which is lighter and safer.
  • Either way, add a test that no wigolo-chrome-* directory survives a fetch.

Pairs naturally with #526.


Generated by Claude Code

KnockOutEZ avatar Oct 21 '26 17:10 KnockOutEZ