feat: support Chrome multi-profile cookie import#65
feat: support Chrome multi-profile cookie import#65Qike-Li wants to merge 2 commits intogarrytan:mainfrom
Conversation
Previously cookie-import-browser only read from Chrome's Default profile, making it impossible to import cookies from other profiles (e.g. Profile 3). This was a common issue for users with multiple Chrome profiles. Changes: - Add listProfiles() to discover all Chrome profiles with cookie DBs - Read profile display names from Chrome's Preferences files - Add profile selector pills in the cookie picker UI - Pass profile parameter through domains/import API endpoints - Add --profile flag to CLI direct import mode Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds an "Import All (N)" button in the source panel footer that imports all visible unimported domains in a single batch request. Respects the search filter so users can narrow down domains first. Button hides when all domains are already imported. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Argus Code Review ReportRepository: gstack SummaryReviewed 4 files. Found 4 issues. 1 observations. 1 high. Score: 75/100. Findings (4)[HIGH] Path traversal validation bypass via absolute path check
Path validation logic treats absolute and relative paths differently, allowing relative paths without '..' sequences to bypass validation when current working directory is unexpected.
Suggestion: Use path.resolve() on all inputs and validate the resolved path against allowed directories. Remove separate '..' check since path.resolve() normalizes such sequences. [MEDIUM] Path traversal vulnerability in findInstalledBrowsers() via symlink attack
The function enumerates directories and checks for 'Profile X' names without validating symlinks, allowing an attacker to create malicious symlinks that cause the function to read from arbitrary filesystem locations.
Suggestion: Add symlink detection using fs.lstatSync() or fs.realpathSync() before checking directory contents. Validate resolved paths stay within the expected Application Support directory tree. [MEDIUM] Missing input validation for browser profile parameter
The
Suggestion: Validate the [MEDIUM] Unvalidated profile parameter in cookie import endpoint
The
Suggestion: Validate the Observations (1)
Generated by Argus — AI-Powered Code Review |
Summary
cookie-import-browserpreviously only read from Chrome's Default profile, making it impossible to import cookies when the user's session lives in a different profile (e.g. Profile 3)listProfiles()to discover all Chrome profiles by scanning for directories with a Cookies DB, and reads human-friendly display names from each profile'sPreferencesfileGET /cookie-picker/profilesAPI endpoint, and--profileCLI flag for direct importsTest plan
bun test— 18 + 12 tests, 0 failures)bun build --compile)🤖 Generated with Claude Code