Merged
Conversation
Add SCP (Secure Copy Protocol) server handler that supports: - Sink mode (-t): Receive files from client (upload) - Source mode (-f): Send files to client (download) - Recursive directory transfer (-r) - Permission preservation (-p) - Path traversal prevention for security Key implementation details: - ScpCommand parser for SCP command detection and flag parsing - ScpHandler with bidirectional communication via mpsc channels - Integration with exec_request handler for SCP command detection - Security: path resolution ensures files stay within root directory - Configurable via scp_enabled setting in ServerConfig Closes #133
- Add symlink escape prevention via canonicalization - Fix TOCTOU race condition in directory creation (atomic mkdir) - Add max line length limit to prevent DoS via memory exhaustion - Mask setuid/setgid/sticky bits from file permissions - Remove unused variable - Improve error messages to not leak internal paths - Add structured security audit logging for blocked operations
- Fix clippy while_let_loop warning in SCP handler - Apply cargo fmt formatting - Add SCP handler documentation to ARCHITECTURE.md - Add SCP protocol handler section to server-configuration.md - Update architecture README to reference SCP handler
Member
Author
PR Finalization ReportProject Structure Discovered
ChecklistTests
Documentation
Code Quality
Changes Made
Verification ResultsAll checks passing. Ready for merge. |
Resolve conflicts between SCP implementation and main branch features: - Merged scp and security modules in src/server/mod.rs - Merged SCP and AuthRateLimiter imports in handler.rs - Merged scp_enabled with security fields in ServerConfig - Merged SCP and Audit Logging in architecture docs Integrated features from main: - Audit logging infrastructure (event, exporter, file, otel, logstash) - Security module (access control, auth rate limiting) - Security configuration fields (auth_window, ban_time, IP whitelist)
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
Implementation Details
SCP Protocol Handler (
src/server/scp.rs)ScpCommand: Parser for SCP command flags and argumentsScpHandler: Main handler implementing the SCP protocol-t): Receives files from the client-f): Sends files to the client-r): Support for directory transfers-p): Preserves file modification timesSecurity Features
/,.., or.as filename)Configuration
scp_enabledsetting inServerConfig(default: true)scp_enabled()for programmatic configurationscp.enabledTest Plan
scpclient (requires running server)Closes #133