summaryrefslogtreecommitdiff
path: root/plugins/code-modernization
diff options
context:
space:
mode:
authorMohamed Hegazy <mhegazy@anthropic.com>2026-10-12 18:43:05 +0000
committerClaude <noreply@anthropic.com>2026-10-15 22:39:38 +0000
commit5ac3c91066c7ec7f36e84348316742f7dd12de6a (patch)
tree118a951ddf548f08dfb48568ac950a0b7ad54cc4 /plugins/code-modernization
parentf359d43b406057f1a8cdbc4ea93b827642c162e6 (diff)
security-guidance: never run a hook with a Python that cannot read it
On Windows, python/python3/py can be packaged launcher aliases (Microsoft Store Python, Python Install Manager). Started through the alias, the interpreter answers `-c` but has a different view of %APPDATA% and cannot see a plugin staged there. sg-python.sh picked it, CPython failed with "can't open file ... [Errno 2]" and exit code 2, and exit 2 from the asyncRewake Stop hook was delivered to the model as review findings. The model's reply ran the Stop hook again, so the session looped without ever reviewing anything (#6251, #5781). The launcher's probe now also checks that the interpreter can read the hook script. When no name on PATH qualifies, it tries the other python3/python entries on PATH by full path and the real executable each alias reports. If nothing can read the script it says so and exits 1, so a launch failure is never reported as findings.
Diffstat (limited to 'plugins/code-modernization')
0 files changed, 0 insertions, 0 deletions