fix(security): harden Electron IPC and shell.openExternal against abuse#162
Open
EnragedAntelope wants to merge 1 commit intoLuqP2:mainfrom
Open
fix(security): harden Electron IPC and shell.openExternal against abuse#162EnragedAntelope wants to merge 1 commit intoLuqP2:mainfrom
EnragedAntelope wants to merge 1 commit intoLuqP2:mainfrom
Conversation
- Validate URL protocol in shell.openExternal to only allow http/https, preventing malicious protocol handler invocation (e.g. file://, smb://) - Add will-navigate handler to block renderer navigation to external URLs - Add path validation to write-file IPC handler (was previously unrestricted, allowing writes to arbitrary filesystem locations) - Restrict open-cache-location handler to app userData directory https://claude.ai/code/session_01HWTeMeasbEW9JPY2d1dcp2
Owner
|
Thanks for this, and sorry for the delay on my side. I reviewed it and it looks solid. I’m merging it into the next release branch. Thanks!! |
Owner
|
Quick follow-up: I realized that the new write-file restriction will break export to folders that are not already indexed. So I’m holding off on merging until I patch that flow properly. The hardening itself still looks good, but, but I need to make sure export remains authorized when the user explicitly picks a location through the native dialog. |
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.
I had Claude review for security. I could not build like you can so test before full implementation: