feat: add Linux cookie import support (GNOME Keyring)#39
Open
amine-amaach wants to merge 4 commits intogarrytan:mainfrom
Open
feat: add Linux cookie import support (GNOME Keyring)#39amine-amaach wants to merge 4 commits intogarrytan:mainfrom
amine-amaach wants to merge 4 commits intogarrytan:mainfrom
Conversation
Cross-platform cookie import for macOS and Linux Chromium browsers. Platform detection via os.platform() selects the right browser registry, config directory, PBKDF2 iteration count, and secret retrieval method at module load. macOS (unchanged behavior): - Browsers: Comet, Chrome, Arc, Brave, Edge - Config: ~/Library/Application Support/ - Secret: macOS Keychain via `security` CLI - PBKDF2: 1003 iterations - Prefix: v10 only Linux (new): - Browsers: Chrome, Chromium, Brave, Edge - Config: ~/.config/ - Secret: GNOME Keyring via python3 gi.repository.Secret - PBKDF2: 1 iteration - Prefixes: v10 (hardcoded "peanuts") + v11 (keyring) - Graceful fallback if keyring unavailable Also updates write-commands.ts to use platform-aware helpers for default browser selection and URL opening (open vs xdg-open).
- Platform-aware test key: uses 1003 iterations on macOS, 1 on Linux - Fixture cookies use v11 prefix on Linux, v10 on macOS - Mock intercepts both macOS `security` and Linux `python3` spawns - Renamed keychainService → secretId in Browser Registry test - Unknown Browser test checks for 'Chrome' (present on both platforms) - New: v11 encryption/decryption round-trip test - New: getOpenCommand() and getDefaultBrowser() platform helper tests - New: platform consistency test (xdg-open/chrome on Linux, open/comet on macOS) 22 tests (was 18), all passing on Linux.
- setup-browser-cookies/SKILL.md: add Linux browsers, keyring notes - TODO.md: mark Linux cookie decryption done, add Windows as separate item - CHANGELOG.md: add 0.3.2 entry for Linux support and CORS fix
38b01ee to
212d5b9
Compare
…mmand The --profile argument was accepted but never parsed, so cookie-import-browser always read from Chrome's Default profile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses the "Linux/Windows cookie decryption" item in TODO.md.
What changed
Platform auto-detected via os.platform() at module load. Graceful fallback when keyring is unavailable (v10 cookies still work, v11 fail individually).
--profile flag fix
cookie-import-browser chrome --domain localhost --profile "Profile 1"now correctly reads from the specified Chrome profile directory instead of always defaulting toDefault. Output includes(profile: Profile 1)when a non-default profile is used.Test plan