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 390930b. Configure here.
|
|
||
| const maxBundleBytes = 128 << 20 | ||
| const ( | ||
| maxBundleBytes = 64 << 20 |
There was a problem hiding this comment.
Bundle cap blocks valid category limits
Medium Severity
Lowering maxBundleBytes to 64 MiB makes the compressed whole-bundle cap equal to a single uncompressed category file (maxPortableFileBytes / MaxPortableStorageSize). Imports that already passed cookie, storage, history, and bookmark checks can still fail in encodeBundle, including selections that would have fit the previous 128 MiB compressed cap. Cookies are always included, so a 64 MiB storage selection plus other default categories has no remaining headroom when content does not compress well.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 390930b. 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.