release: compile PyInstaller's bootloader from source and give Mandy.exe a version resource (RELEASE-AV-FALSE-POSITIVE) #3562

Merged
leonida/mandy
MoonEyes merged 2 commits from oreofr/release-av-false-positives into main 2026-12-05 20:39:37 +00:00 AGit

Pull request successfully merged and closed

Member

Item: RELEASE-AV-FALSE-POSITIVE (claimed in #3312).

Microsoft Defender quarantined an installed Mandy.exe as Trojan:Win32/Bearfoos.A!ml (a player's PC, 2026-12-05). The !ml suffix is a machine-learning verdict, not a signature. The launcher is an unsigned PyInstaller program with no version resource, built on the wheel's prebuilt bootloader, which every PyInstaller program shares, malware included.

What changes

  • release.yml installs PyInstaller with --no-binary pyinstaller and PYINSTALLER_COMPILE_BOOTLOADER=1, so the runner's MSVC builds the bootloader from the pinned 6.22.3 source.
  • packaging/windows/version_info.py (new, standard library) writes the --version-file for Mandy.exe: product Mandy, publisher, the version from the tag, the file's name and role. Every string goes through repr(). The Setup gets its version resource at the release that reworks it (OreoFR); the compiled bootloader applies to both executables, since one PyInstaller builds them.
  • packaging/windows/README.md: what a !ml verdict is, and what to do when one still comes (send the release's files to Microsoft as a false positive). Only code signing ends these for good; this PR does not sign.
  • tests/test_release_pipeline.py: 6 new tests (bootloader step, the launcher's --version-file, tag to version numbers, quoting, the file PyInstaller reads, evaluated with stand-in classes).

Tested

  • python -I tests/test_release_pipeline.py: 25 tests OK. tests/test_text_write_line_endings.py OK. scripts/check_no_game_data.py on the changed files: clean.
  • The real build on Windows 11, Python 3.12, MSVC 2022 (no CI run):
    • pip compiled the bootloader: runw.exe SHA-256 B4734F41... against 2291F269... in the official wheel.
    • PyInstaller 6.22.3 froze tools/leonida_launcher.py with the version file.
    • The Properties of Mandy.exe read Mandy | Mandy contributors | Mandy, the launcher | 1.0.2.0 | v1.0.2 | Mandy.exe.
  • Not checked:
    • whether Defender's verdict goes away (it depends on Microsoft's cloud model);
    • the GitHub runner's MSVC: windows-latest ships Visual Studio 2022, which is the toolchain the local build used.

Merges cleanly into main d41692896. Nothing of the game, no runtime, no SDK library.

AI-assisted (Claude Code, oreofr-agent).

🤖 Generated with Claude Code

Item: **RELEASE-AV-FALSE-POSITIVE** (claimed in #3312). Microsoft Defender quarantined an installed `Mandy.exe` as `Trojan:Win32/Bearfoos.A!ml` (a player's PC, 2026-12-05). The `!ml` suffix is a machine-learning verdict, not a signature. The launcher is an unsigned PyInstaller program with no version resource, built on the wheel's prebuilt bootloader, which every PyInstaller program shares, malware included. ## What changes - `release.yml` installs PyInstaller with `--no-binary pyinstaller` and `PYINSTALLER_COMPILE_BOOTLOADER=1`, so the runner's MSVC builds the bootloader from the pinned 6.22.3 source. - `packaging/windows/version_info.py` (new, standard library) writes the `--version-file` for `Mandy.exe`: product Mandy, publisher, the version from the tag, the file's name and role. Every string goes through `repr()`. The Setup gets its version resource at the release that reworks it (OreoFR); the compiled bootloader applies to both executables, since one PyInstaller builds them. - `packaging/windows/README.md`: what a `!ml` verdict is, and what to do when one still comes (send the release's files to Microsoft as a false positive). Only code signing ends these for good; this PR does not sign. - `tests/test_release_pipeline.py`: 6 new tests (bootloader step, the launcher's `--version-file`, tag to version numbers, quoting, the file PyInstaller reads, evaluated with stand-in classes). ## Tested - `python -I tests/test_release_pipeline.py`: 25 tests OK. `tests/test_text_write_line_endings.py` OK. `scripts/check_no_game_data.py` on the changed files: clean. - The real build on Windows 11, Python 3.12, MSVC 2022 (no CI run): - pip compiled the bootloader: `runw.exe` SHA-256 `B4734F41...` against `2291F269...` in the official wheel. - PyInstaller 6.22.3 froze `tools/leonida_launcher.py` with the version file. - The Properties of `Mandy.exe` read `Mandy | Mandy contributors | Mandy, the launcher | 1.0.2.0 | v1.0.2 | Mandy.exe`. - Not checked: - whether Defender's verdict goes away (it depends on Microsoft's cloud model); - the GitHub runner's MSVC: `windows-latest` ships Visual Studio 2022, which is the toolchain the local build used. Merges cleanly into `main` d41692896. Nothing of the game, no runtime, no SDK library. AI-assisted (Claude Code, oreofr-agent). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Microsoft Defender quarantined an installed Mandy.exe as Trojan:Win32/Bearfoos.A!ml, a machine-learning
verdict. The launcher is an unsigned PyInstaller program with no version resource, built on the wheel's
prebuilt bootloader, which every PyInstaller program shares, malware included.

- release.yml installs PyInstaller with --no-binary and PYINSTALLER_COMPILE_BOOTLOADER=1, so the runner's
  MSVC builds the bootloader from the pinned source.
- packaging/windows/version_info.py (standard library) writes the --version-file for Mandy.exe and
  Mandy-Setup-<tag>.exe: product Mandy, its publisher, the version from the tag, the file's name and role.
- packaging/windows/README.md says what to do when a verdict still comes (send it to Microsoft as a false
  positive; only code signing ends these for good).

Checked locally (Windows 11, Python 3.12, MSVC 2022): pip built the bootloader (runw.exe hash differs from
the wheel's), PyInstaller 6.22.3 froze the launcher with the version file, and the Properties of Mandy.exe
show Mandy / Mandy contributors / 1.0.2.0 / v1.0.2. tests/test_release_pipeline.py: 25 tests OK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OreoFR changed title from release: compile PyInstaller's bootloader from source and give Mandy.exe a version resource to release: compile PyInstaller's bootloader from source and give Mandy.exe a version resource (RELEASE-AV-FALSE-POSITIVE) 2026-12-05 20:05:43 +00:00
Sign in to join this conversation.
No description provided.