Skip to content

Feature/fix various bugs#22

Merged
Thompson-Jason merged 6 commits intomainfrom
feature/fix_various_bugs
Feb 13, 2026
Merged

Feature/fix various bugs#22
Thompson-Jason merged 6 commits intomainfrom
feature/fix_various_bugs

Conversation

@Thompson-Jason
Copy link
Owner

This pull request introduces several significant improvements to DockSprout, focusing on enhanced error handling, security, logging, concurrent execution, and user experience. The changes include adding robust error collection and reporting for Docker Compose commands, implementing secure command execution to prevent injection, supporting graceful shutdown on Ctrl+C, and improving directory traversal safety. The documentation and usage instructions have also been updated for clarity.

Error handling, logging, and concurrency improvements:

  • Added error collection for both sequential and concurrent Docker Compose runs, with detailed error reporting and appropriate exit codes. Integrated log and env_logger for structured logging throughout the application. (src/lib.rs, src/main.rs, Cargo.toml) [1] [2] [3]
  • Implemented concurrent execution with improved error tracking, thread safety using Arc and Mutex, and a shutdown flag for graceful cancellation. (src/lib.rs, src/main.rs) [1] [2]

Security enhancements:

  • Added validation to prevent command injection by rejecting file paths containing dangerous shell characters in Docker Compose runners. (src/main.rs) [1] [2]

Signal handling and graceful shutdown:

  • Introduced a signal handler to catch Ctrl+C (SIGINT), terminate all running child processes, and exit cleanly, preventing orphaned containers. (src/signal.rs, src/main.rs) [1] [2] [3]

Directory traversal safety:

  • Restricted compose file search to $HOME and /tmp by default, with an override via the SPROUT_ALLOW_ANY_ROOT environment variable. Added environment-controlled .git requirement for directory walking. (src/walker.rs)

Documentation and user experience:

  • Updated the README.md with clearer usage instructions, new options (--concurrent, --verbose), and example commands. Improved spinner visuals and error messages for missing or invalid arguments. (README.md, src/main.rs) [1] [2] [3]

Testing and cross-platform support:

  • Enhanced test mocks for cross-platform compatibility and updated function signatures to use slices for arguments, improving ergonomics and safety. (tests/libTests.rs) [1] [2] [3]

These changes collectively make DockSprout more robust, secure, and user-friendly.

@Thompson-Jason Thompson-Jason merged commit f71af27 into main Feb 13, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments