Environment:
- Windows 11 25H2
- Smart App Control: On
- Personal device, no MDM/domain/AppLocker policies
Describe the bug
The bootstrap installer fails at the dependencies stage with:
An Application Control policy has blocked this file. (os error 4551)
The installer creates a Python virtualenv at C:\Users\<user>\AppData\Local\hermes\hermes-agent\venv\Scripts\python.exe and then attempts to execute it. Windows Smart App Control (SAC) blocks this because the binary is unsigned and has no Microsoft reputation history. SAC uses Windows Defender Application Control (WDAC) under the hood and treats unsigned executables dropped into user-writable paths by a PS1 script as a threat pattern -- which is correct behaviour on its part.
Adding a Windows Defender antivirus exclusion has no effect, as SAC is a separate enforcement layer.
To reproduce
- Install Windows 11 22H2 or later with Smart App Control enabled
- Run the Hermes bootstrap installer
- Installation fails at the
dependencies stage
Expected behaviour
Installation completes successfully.
Actual behaviour
Installation fails. The installer cannot execute python.exe from the virtualenv it just created.
Suggested fixes
-
Install to C:\Program Files\Hermes instead of AppData -- SAC applies stricter scrutiny to executables in user-writable paths. Installing to C:\Program Files\ does not automatically resolve the signing requirement, but it is the conventional location for application binaries and reduces the attack-surface profile that triggers SAC.
-
Code-sign all shipped binaries -- SAC will allow execution of binaries signed with a trusted Authenticode certificate. This includes python.exe, any compiled extensions, and the installer itself. Without code-signing, there is no reliable way for users with SAC enabled to install Hermes without disabling a security control that cannot easily be re-enabled once turned off.
-
Ship an MSIX package -- MSIX packages require a valid code signature to install and are the recommended distribution format for Windows 11. This would resolve both the signing and the install path issues in one go.
Workarounds
- Disabling SAC is not a reasonable ask -- it cannot be re-enabled without a Windows reinstall
Environment:
Describe the bug
The bootstrap installer fails at the
dependenciesstage with:The installer creates a Python virtualenv at
C:\Users\<user>\AppData\Local\hermes\hermes-agent\venv\Scripts\python.exeand then attempts to execute it. Windows Smart App Control (SAC) blocks this because the binary is unsigned and has no Microsoft reputation history. SAC uses Windows Defender Application Control (WDAC) under the hood and treats unsigned executables dropped into user-writable paths by a PS1 script as a threat pattern -- which is correct behaviour on its part.Adding a Windows Defender antivirus exclusion has no effect, as SAC is a separate enforcement layer.
To reproduce
dependenciesstageExpected behaviour
Installation completes successfully.
Actual behaviour
Installation fails. The installer cannot execute
python.exefrom the virtualenv it just created.Suggested fixes
Install to
C:\Program Files\Hermesinstead ofAppData-- SAC applies stricter scrutiny to executables in user-writable paths. Installing toC:\Program Files\does not automatically resolve the signing requirement, but it is the conventional location for application binaries and reduces the attack-surface profile that triggers SAC.Code-sign all shipped binaries -- SAC will allow execution of binaries signed with a trusted Authenticode certificate. This includes
python.exe, any compiled extensions, and the installer itself. Without code-signing, there is no reliable way for users with SAC enabled to install Hermes without disabling a security control that cannot easily be re-enabled once turned off.Ship an MSIX package -- MSIX packages require a valid code signature to install and are the recommended distribution format for Windows 11. This would resolve both the signing and the install path issues in one go.
Workarounds