mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-13 02:47:00 +00:00
0fdfdedcaa
Per adversarial review of the #1127 fix: - Apply the filesystem-path allowlist to sys.executable before embedding it in the generated hook script. Paths with metacharacters outside [a-zA-Z0-9/_.@:\-] (spaces, dollar signs, backticks, semicolons) are replaced with an empty string so the pinned probe is safely skipped rather than injecting shell commands that execute on every git commit. - Change _PINNED='...' to single-quote assignment so no shell expansion can occur even if a character slipped through the allowlist (belt and suspenders). - Quote $GRAPHIFY_PYTHON in both nohup exec lines so paths with spaces work (common in Windows C:\Program Files\... installs). - Update test to assert the sanitized value, not raw sys.executable, so the test stays correct after any future sanitization changes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>