fix: prevent plaintext key leak in vault.json and IPC broadcast#6
Merged
easyvibecoding merged 1 commit intomainfrom Mar 18, 2026
Merged
fix: prevent plaintext key leak in vault.json and IPC broadcast#6easyvibecoding merged 1 commit intomainfrom
easyvibecoding merged 1 commit intomainfrom
Conversation
Pattern field in vault.json stored the literal API key value (regex-escaped
but identical for alphanumeric keys). This leaked plaintext via
pattern_cache_sync IPC broadcast to all connected extensions.
Changes:
- Extension sends structural regex from CAPTURE_PATTERNS instead of rawValue
- Core uses extension-provided pattern, with fallback derivation from key
structure (prefix + char class + length)
- Remove isAlreadyStoredKey() which false-positived on structural patterns
- Add Keychain-free dedup via SHA-256 valueHash in vault.json
- Auto-click copy buttons for AWS Secret Key and AI Studio key capture
- Remove seedTestKeysIfNeeded() — Active Key Capture handles storage
Security: vault.json and IPC now contain "AKIA[0-9A-Z]{16}" instead of
the actual key value. Plaintext only flows Keychain → ClipboardEngine.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
pattern_cache_syncIPCbroadcast. Now stores structural regex (e.g.
AKIA[0-9A-Z]{16}) instead.valueHashin vault.json.seedTestKeysIfNeeded()— Active Key Capture handles key storage.Changes
capture-patterns.tsgetPatternRegexSource()helpermasker.tsisAlreadyStoredKey, AWS/AI Studio auto-clickIPCServer.swiftderiveStructuralPattern(), Keychain-free dedupVaultManager.swiftisDuplicateKey()via valueHashKeyEntry.swiftvalueHashfield +computeHash()AppState.swiftTest plan
AKIA[0-9A-Z]{16}🤖 Generated with Claude Code