fix trufflehog hook on Windows MSYS2 #520

Merged
coilyco-ops merged 1 commit from issue-485 into main 2026-07-14 09:29:45 +00:00
Member

This changes the trufflehog catalog hook to write its exclude-path regex list to a real temp file before invoking trufflehog. That avoids the /dev/fd/N path that MSYS2 Git Bash hands to native Windows binaries, so the hook scans instead of failing before it starts.

  • Replaces process substitution with mktemp plus an EXIT cleanup trap.
  • Adds a regression test that verifies the exclude list is a real file and not /dev/fd/....
  • Validation: ward pre-commit-all; ward test -- tests/test_trufflehog_scan.py.

closes #485
ward.workflow: pull-request-and-merge

This changes the trufflehog catalog hook to write its exclude-path regex list to a real temp file before invoking trufflehog. That avoids the `/dev/fd/N` path that MSYS2 Git Bash hands to native Windows binaries, so the hook scans instead of failing before it starts. - Replaces process substitution with `mktemp` plus an EXIT cleanup trap. - Adds a regression test that verifies the exclude list is a real file and not `/dev/fd/...`. - Validation: `ward pre-commit-all`; `ward test -- tests/test_trufflehog_scan.py`. closes #485 ward.workflow: pull-request-and-merge
fix trufflehog exclude-paths temp file
All checks were successful
ci / ward-doctor (pull_request) Successful in 4m54s
ci / gate (pull_request) Successful in 6m30s
e24590640a
coilyco-ops deleted branch issue-485 2026-07-14 09:29:46 +00:00
Sign in to join this conversation.
No description provided.