| Crates.io | spath-cli |
| lib.rs | spath-cli |
| version | 0.1.3 |
| created_at | 2025-12-18 12:03:08.738075+00 |
| updated_at | 2026-01-06 09:18:17.129284+00 |
| description | A Windows PATH security scanner and fixer - detects and fixes unquoted paths with spaces |
| homepage | https://github.com/vremyavnikuda/spath_cli |
| repository | https://github.com/vremyavnikuda/spath_cli |
| max_upload_size | |
| id | 1992282 |
| size | 5,301,032 |

Windows PATH security scanner and optimizer.
Windows PATH entries with spaces but without quotes create security vulnerabilities that can be exploited for privilege escalation attacks.
spath detects and fixes these vulnerabilities automatically.
Download from GitHub Releases:
spath-setup.exe — Installer (adds to PATH automatically)spath.exe — Standalone executablespath-windows-x64.zip — Archive with docscargo install spath-cli
cargo build --release
Binary location: target/release/spath.exe
Analyze PATH for security issues.
spath scan # Scan USER PATH only
spath scan --verbose # Show detailed information
spath scan --audit # Show audit statistics
spath scan --system # Scan SYSTEM PATH (requires admin to fix)
Check if critical issues are actually exploitable by verifying the presence of malicious files.
spath verify # Verify USER PATH security
spath verify --system # Verify SYSTEM PATH security
This command checks if unquoted paths with spaces can actually be exploited by looking for malicious files like C:\Program.exe that could hijack legitimate programs.
Fix USER PATH issues (no admin required).
spath fix --dry-run # Preview changes without applying
spath fix # Apply fixes to USER PATH
spath fix --delicate # Ask for confirmation before changes
Analyze both SYSTEM and USER PATH.
spath analyze
Remove duplicate paths and optimize PATH.
spath clean --dry-run # Preview cleanup
spath clean # Clean USER PATH
spath clean --system # Clean SYSTEM PATH (requires admin)
spath clean --delicate # Ask for confirmation
Display PATH structure with visual indicators.
spath visualize # Simple list view with status indicators
spath visualize --tree # Tree view showing directory hierarchy
spath visualize --user # Show only USER PATH
spath visualize --system # Show only SYSTEM PATH
spath visualize --no-color # Disable color output
Visual indicators:
spath backup # Create backup of current PATH
spath list-backups # List all available backups
spath restore <backup-file> # Restore from backup
spath restore <backup-file> --delicate # Restore with confirmation
CRITICAL: Unquoted paths with spaces in system directories (e.g., C:\Program Files) - potential security vulnerability that could be exploited
WARNING: Non-existent paths, relative paths, or unquoted paths with spaces that don't exist
INFO: Informational messages about properly quoted paths or minor issues
The verify command distinguishes between:
Example: If C:\Program Files\App\bin is in PATH without quotes, the tool checks for:
C:\Program.exeC:\Program.comC:\Program.batC:\Program.cmdspath scan --auditspath verify (check for real threats)spath backupspath fixspath cleanspath restore <backup-file>spath scan --systemspath verify --system (check for exploits)--dry-run or -d - Preview changes without applying--delicate - Ask for confirmation before applying changes--system or -s - Include SYSTEM PATH operations (requires admin)--verbose or -v - Show detailed information--audit or -a - Show detailed audit report--delicate for extra safety with confirmation promptsMIT License - see the LICENSE file for details
See CHANGELOG.md for version history and release notes.