summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/scripts/render_rules.py
diff options
context:
space:
mode:
authorMohamed Hegazy <mhegazy@anthropic.com>2026-10-12 19:42:43 +0000
committerClaude <noreply@anthropic.com>2026-10-15 22:39:39 +0000
commitcae27dda6824b4861e305c3a145e22379fd837ed (patch)
tree37a9aa21f8b655b0ad3e54a00b731281083024e7 /plugins/code-modernization/scripts/render_rules.py
parent5a1d326c862f33d05a9e65f30e50a71a4e71d4a5 (diff)
security-guidance: start fewer processes in the hook launcher
sg-python.sh runs on every hook, and under Git Bash each command substitution is a new Windows process, whether or not the interpreter it probes exists (#6470). On a machine with only `python` it started 13 processes before the hook; it now starts 1. - Skip interpreter names that are not on PATH (a builtin lookup) before probing them. - The probe execs the interpreter in its subshell instead of forking again from it. - Remember the first Python below 3.10 seen in pass 2 instead of probing the same names a second time in pass 3. - Convert drive paths (/c/Users/...) to Windows form in-shell under Git Bash / MSYS2; mount points and Cygwin still go through cygpath. Interpreter order and the choice made are unchanged.
Diffstat (limited to 'plugins/code-modernization/scripts/render_rules.py')
0 files changed, 0 insertions, 0 deletions