fix: harden SFTP host verification and Electron windows#1
Merged
Conversation
Add SftpStatusBar component showing folder/file count and total size per pane, with selection-aware stats. Implement click-and-drag range selection in FileList by tracking mousedown/mouseenter gestures and making draggable conditional on existing selection. Also address codebase audit findings: add stream error handler in execCommand, catch unhandled dialog promise, return value from setSignals IPC handler, remove debug console.log statements, fix useState initializers, type-safe protocol cast, and update .gitignore. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Security hardening: - SFTP drag-out path traversal protection (resolveSafeDragOutPath) - Renderer URL allowlisting (only localhost/file:// origins) - Navigation guards (will-navigate blocks cross-origin, deny all popups) - SFTP host key verification via trusted fingerprints from DB SFTP drag-out fixes: - Use native SCP instead of ssh2 streams (which fail with SSH_FX_FAILURE) - Pre-cache files on selection so startDrag fires instantly on drag - Support directory drag-out with scp -r - Fallback icon when app.getFileIcon fails - Graceful error handling for SCP failures - Platform-agnostic test paths Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9432e64 to
9224075
Compare
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
../, path separators, and control charactersfile://andlocalhostorigins for the rendererwill-navigateblocks cross-origin navigation,setWindowOpenHandlerdenies all popupssandbox: trueon both main and editor windowshostVerifiercallback (SHA256)path.resolve/path.joininstead of hardcoded Unix pathsTest plan
pnpm buildpasseswindowSecurity,sftpIpc.security,sftpTransport.security)main.lifecycletests updated and passingwindow.open()is blocked in DevTools console🤖 Generated with Claude Code