Installer: drop redundant -WindowStyle Hidden from the Windows launcher VBS#6284
Merged
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…er VBS The desktop / Start Menu shortcut launches Studio through a generated launch-studio.vbs that runs: shell.Run "powershell ... -WindowStyle Hidden -File launch-studio.ps1", 0, False The second argument to shell.Run is intWindowStyle 0 (hidden), so WScript already launches the child windowless. The child -WindowStyle Hidden is therefore redundant: dropping it keeps the launcher hidden and behaviour identical, while removing the WScript-spawns-hidden-ExecutionPolicy-Bypass PowerShell token combination that antivirus heuristics weight. That shape was reported as a Kaspersky HEUR:Trojan.VBS.Agent false positive during install. Adds tests/studio/install/test_launch_studio_launcher.py to stop the flag from being reintroduced and to assert the launcher stays windowless via shell.Run(cmd, 0, False).
563bbd9 to
7841e7e
Compare
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Windows installer creates a desktop / Start Menu shortcut that launches Unsloth Studio windowlessly through a generated
launch-studio.vbs:The second argument to
shell.RunisintWindowStyle = 0(hidden), so WScript already starts the child windowless. The child-WindowStyle Hiddenis therefore redundant. This drops it, which keeps the launcher hidden and the behaviour identical, and removes the "WScript spawns a hidden, ExecutionPolicy-Bypass PowerShell" token combination that antivirus heuristics weight. That shape was reported as a KasperskyHEUR:Trojan.VBS.Agentfalse positive during install.-ExecutionPolicy Bypassis kept on purpose: the locally generated, unsigned.ps1must still run under the default Restricted machine policy.Why this is a false positive (audit)
I scanned the exact launcher files the installer writes (the current baseline plus several hardening candidates) across Windows, macOS and Linux runners, and on VirusTotal:
Every engine is clean, both statically and at launch, confirmed across three independent Defender-live runs. The Kaspersky desktop detection is a transient heuristic / cloud-reputation false positive that does not reproduce in current engines; this change trims the heuristic footprint that produced it.
Tests
tests/studio/install/test_launch_studio_launcher.pyasserts the generated VBS no longer passes-WindowStyle Hidden, still stays windowless viashell.Run(cmd, 0, False), and keeps-ExecutionPolicy Bypass -File.tests/python/test_cross_platform_parity.pystill passes.Operational follow-up
Submitting the launcher to the Kaspersky and Microsoft false-positive / whitelist portals is recommended so the transient detection is cleared vendor-side as well.