Import portable browser profile data - #229
Conversation
Import bookmarks, recent history, local storage, and selected Web Store extensions alongside cookies. Keep values local until final approval, enforce the API payload bounds in the CLI, and apply extension entitlements before upload.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c1ea80c. Configure here.
| ) | ||
| } | ||
| if fit.skippedHistoryRecords > 0 { | ||
| pterm.Printf(" History — %d visit%s\n", fit.skippedHistoryRecords, pluralSuffix(fit.skippedHistoryRecords)) |
There was a problem hiding this comment.
History skip count mislabels unique URLs
Medium Severity
The bundle-fallback confirmation reports skipped history as visits using len(data.History). Exported history is grouped by URL, with per-URL VisitCount, while the earlier import summary uses HistoryCount visit rows. The skip prompt can show a much smaller number than the visits the user just approved, so they can undercount how much history will be dropped.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c1ea80c. Configure here.


What
Extend
kernel profiles import-localbeyond cookies to import approved portable browser data from Chrome and Helium on macOS:--dayswindow, selected by defaultPasswords and supported TOTP seeds remain a separate Managed Auth step. IndexedDB, cache, arbitrary preferences, and extension state are intentionally excluded.
Why
A useful imported profile needs more than cookies. This keeps the moment-to-magic flow simple while preserving a portable, bounded contract and making sensitive categories visible before upload. History uses actual visits in the chosen time window instead of lifetime URL counters.
How
cookies_importedJSON field while adding per-category resultsDepends on kernel/kernel PR #3244 for server-side extension persistence and entitlement enforcement.
Verification
go test ./internal/browserimport ./cmd -count=1go vet ./internal/browserimport ./cmdgo mod tidy -diffgit diff --checkmake buildNote
Medium Risk
Touches sensitive local browser data (cookies, history, storage) and upload paths with new decryption/export timing; connector env injection affects auth for kernel:// launches.
Overview
kernel profiles import-localnow imports bookmarks, browsing history (within--days, default on via--history), and localStorage in addition to cookies, not just cookies.The flow gathers metadata first (counts/sizes), lets users multi-select categories and trim localStorage origins when total size exceeds 64 MiB, then shows a summary and confirmation before decrypting cookies and exporting values. Upload uses
BuildProfileBundlewith inventory/selection categories ordered cookies → storage → bookmarks → history; JSON output addsbrowser_data_importedwhile keepingcookies_imported.internal/browserimportadds Chromium readers for Bookmarks, History (SQLite snapshots), and LevelDB local storage (with origin filtering and size caps), plus bundle encoding limits (records, per-file MiB, 128 MiB bundle).goleveldbis a new dependency.internal/connectormacOS handler now exportsKERNEL_*env vars from launchctl before running the CLI so deep-linked imports inherit auth config.Extension import mentioned in the PR description is not in this diff.
Reviewed by Cursor Bugbot for commit b2201c8. Bugbot is set up for automated code reviews on this repo. Configure here.