feat(hooks): block backslashed Windows-path redirects in bash

Adds a PreToolUse(Bash) hook (block-backslash-winpath.sh) that rejects commands
redirecting/writing to a backslashed Windows drive path (e.g. > D:\claudetools\
.claude\current-mode). On Git Bash those strip the backslashes and PUA-substitute
':' (U+F03A), creating garbled junk files that have repeatedly polluted the repo.
The hook quote-strips the command first, so the pattern appearing inside strings
or commit messages does not false-trigger; Windows-tool args (icacls, pwsh -File)
and forward-slash/relative paths pass. Wired into settings.json so every machine
picks it up on /sync. Pairs with the sync.sh staging guard.

Also: CLAUDE.md note on the Windows mode-write path; record jq install on GURU-KALI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-24 10:38:14 -07:00
parent a3c7064606
commit 6d065cf3ee
4 changed files with 53 additions and 1 deletions

View File

@@ -33,7 +33,8 @@
| nmap | 7.99 (Kali security tooling) |
| GuruRMM build dev libs | libgtk-3-dev, libayatana-appindicator3-dev, libxdo-dev, libssl-dev, pkg-config (for agent + tray builds) — added 2026-05-24 |
| NVIDIA driver | nouveau (open-source) — NO proprietary driver / CUDA |
| jq / gh / docker / age / op / grepai / ollama | NOT installed |
| jq | 1.8.1 (added 2026-05-24, needed by hooks) |
| gh / docker / age / op / grepai / ollama | NOT installed |
---