mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-09-28 06:45:17 +08:00
The lifecycle guard classifies a `.py` script as Python and skips its shell reference walk, so `interpreter=/bin/bash` on a `.py` whose body is `bash restart.sh` was created and then executed as shell. Refuse any interpreter whose name (or symlink target's name) is not a Python image, reusing the guard's own `_INTERPRETER_IMAGE_RE`. One parametrized test covers every refusal (bare name, missing, directory, non-executable, /bin/bash, python -> /bin/bash symlink); the two run-path tests now use a `python3`-named wrapper.