fix(security): complete Windows tirith install support - #8615
fix(security): complete Windows tirith install support#8615XiaoXiao0221 wants to merge 2 commits into
Conversation
…tirith binary - Add Windows platform detection in _detect_target() (pc-windows-msvc) - Use .zip archive for Windows targets instead of .tar.gz - Implement zipfile extraction for Windows binary (tirith.exe) - Fix path resolution bug where src_base ignored nested zip members - Skip chmod +x on Windows (not supported) - Add unit test script for cross-platform archive handling Fixes: WinError 2 file not found when tirith auto-installs on Windows
|
Thanks for this — appreciate the work. We're closing the entire cluster of open native-Windows PRs (44 of them spanning installer, terminal routing, file ops, gateway PID handling, encoding, docs, and more) because the surface area needs a designed, consolidated approach rather than piecemeal merges. Cherry-picking individual fixes keeps leaving inconsistencies and we'd rather land Windows support properly, in one coherent pass.\n\nYour PR is catalogued in our internal Windows support plan. When we pick this back up (soon), we'll mine every PR in the cluster for its fix shape and credit all contributors whose work informs the final patch via lines. Watch for the consolidating PR and feel free to chime in with context on the specific failure mode you were hitting.\n\nClosing for now, not as a rejection of the fix — just queueing it for the designed rollout. Thanks again. |
What does this PR do?
This PR fixes Windows auto-install support for the
tirith_securitytool.On Windows,
tirithreleases use.ziparchives and installtirith.exeinstead oftirith. The original code only handled Linux/macOS archive and binary conventions, which caused auto-install to fail. This PR adds the Windows archive/install path and also fixes the follow-up resolution path so Hermes can keep finding the installed binary under$HERMES_HOME/binafter installation or on later runs.Related Issue
Fixes the Windows
WinError 2auto-install failure for the Tirith security scanner.Type of Change
Changes Made
tools/tirith_security.py(pc-windows-msvc).ziparchives for Windows while keeping.tar.gzfor Linux/macOStirith.exefrom Windows release archives and skip Unix-stylechmodon Windows$HERMES_HOME/bin/tirith.exeafter install and after restarttests/tools/test_tirith_security.pyand remove the standalone ad-hoc test scriptHow to Test
python -m pytest tests/tools/test_tirith_security.py -q -n 0.ziprelease and installstirith.exe$HERMES_HOME/bin/tirith.exeon a later run without reinstallingChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
python -m pytest tests/tools/test_tirith_security.py -q -n 0->66 passed in 1.68son Windowstirith.exe