Fix shell script security vulnerabilities, reliability issues, and enhance CLI experience#2
Draft
Fix shell script security vulnerabilities, reliability issues, and enhance CLI experience#2
Conversation
- Add proper quoting for all variables to prevent word splitting - Fix command injection vulnerability in git config - Add error handling for git clone operations - Fix directory changes with subshells - Add -r flag to read commands to prevent backslash interpretation - Replace deprecated expr substr with bash parameter expansion - Fix ASDF plugin installation with || true for idempotency - Add shebangs to all shell scripts - Fix PATH concatenation in zlogin - Improve git-prune-branches function with proper quoting - Replace backticks with $() notation - Fix printf format string security issues Co-authored-by: noofreuuuh <1218742+noofreuuuh@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review code and implement improvements
Fix shell script security vulnerabilities and reliability issues
Jan 31, 2026
Member
|
@copilot Improve the cli experience |
…racking - Add color support with automatic TTY detection - Create helper functions for consistent messaging (success, error, warning, info) - Add welcome banner with ASCII art - Implement command-line argument parsing (--help, --yes) - Add comprehensive help/usage information - Improve visual hierarchy with styled headers and sections - Add progress tracking with step indicators - Implement installation summary at the end showing: * Successfully installed components * Skipped components (already installed) * Failed components (with error status) - Add "Next steps" guidance after installation - Use Unicode symbols (✓, ✗, ⚠, ℹ, ►) for better visual feedback - Track installation status for all components - Add non-interactive mode support with -y flag Co-authored-by: noofreuuuh <1218742+noofreuuuh@users.noreply.github.com>
Author
Enhanced the CLI experience with the following improvements (commit ca8a406): Visual Enhancements:
Functionality:
Progress Tracking:
User Guidance:
The script now provides a much more professional and user-friendly installation experience. |
- Use printf instead of echo -e in read prompts for reliable color codes - Add error checking for Oh My Zsh installation - Add error checking for Nerd Font downloads - Report warnings when installations encounter issues Co-authored-by: noofreuuuh <1218742+noofreuuuh@users.noreply.github.com>
Copilot
AI
changed the title
Fix shell script security vulnerabilities and reliability issues
Fix shell script security vulnerabilities, reliability issues, and enhance CLI experience
Jan 31, 2026
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.
Comprehensive security and quality improvements across all shell scripts in the dotfiles repository, plus major CLI experience enhancements.
Security Fixes
Command Injection - Unquoted variables in
git configallowed arbitrary command execution:Word Splitting - Unquoted variable expansions throughout (
$HOME,$PWD,$ZSH_CUSTOM, etc.) could cause failures with paths containing spaces or special characters. All variable expansions now quoted.Format String Vulnerabilities - Printf calls in
prompt_for_multiselect.shused variables directly in format strings. Now use proper format specifiers.Reliability Improvements
Directory Traversal - Font installation
cdcommands left script in wrong directory on failure. Now isolated in subshells:Git Clone Idempotency - ZSH plugin installations failed on re-runs. Added existence checks before cloning.
ASDF Plugin Installation - Added
|| trueto plugin-add commands for idempotent execution.Error Handling - Added error checking for Oh My Zsh installation, Nerd Font downloads, and other critical operations with proper status reporting.
Code Quality
expr substr $(uname)with[[ "$(uname)" == Linux* ]]$()notation-rflag toreadcommands to prevent backslash interpretationletto(( ))arithmetic syntaxgit-prune-branchesto handle branch names with spaces usingwhile readinstead offorloop with command substitutionCLI Experience Enhancements
Visual Improvements:
New Features:
--help/-hflag: Display comprehensive usage information--yes/-yflag: Non-interactive mode with default selectionsprint_header(),print_step(),print_success(),print_error(),print_warning(),print_info(),print_section()Installation Summary:
Stats: 6 files modified, +390/-160 lines
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.