Skip to content

Installation fails on Windows 11 with Smart App Control enabled #536

Description

@wight-trash

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

  1. Install Windows 11 22H2 or later with Smart App Control enabled
  2. Run the Hermes bootstrap installer
  3. 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

  1. 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.

  2. 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.

  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions