Idea: Authenticode signing for the Windows builder and launcher, separate from signed release manifests #46
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#46
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The idea
Give Longshot's distributed Windows programs a verified publisher identity, to reduce unknown-publisher warnings and help with antivirus false alarms. This is Windows Authenticode signing, not a replacement for the signed-release design already proposed on the forge. Signing is useful, but it cannot promise that Defender, SmartScreen or another antivirus will accept every new file.
What the forge's signing already proposes
Longshot PR 13 and LongshotLauncher PR 1 are open. They sign release metadata and channel pointers with project-controlled ECDSA P-256/SHA-256 keys:
longshot-release.jsonnames the release's product, version and files, with sizes and SHA-256 hashes. For the builder, the signed parts list in turn names each part by its hash.stable,rcandnightlypointers identify the offered release. The launcher checks the product, channel, signature and remembered channel serial, and checks downloaded bytes against the authenticated hashes.That does not put an Authenticode signature in a Windows EXE, establish a Windows-trusted publisher identity, attest that the build faithfully used its named source, or transfer SmartScreen reputation to it. The launcher must itself be obtained and trusted first. At the inspected heads, the built-in release-key lists are still empty; these are proposed release mechanisms, not a claim that signed Longshot releases are already shipping.
The launcher has already recognized the remaining problem: its README explicitly lists Authenticode as planned. Its packaging recipe builds the Windows EXE but does not code-sign it. The ask here is therefore to agree the identity, signing service and coverage for that planned work, including the builder/setup programs delivered by Longshot, rather than propose another manifest format.
What can be prepared
LongshotBuilder.exefor RecompLauncher. Inventory third-party components separately; do not sign someone else's binaries as our own.builder/setup/setup.rchas numericFILEVERSIONandPRODUCTVERSIONboth fixed at1.0.0.0, aFileVersionstring of1.0.0, noProductVersionstring or copyright string, andOriginalFilename=LongshotBuilder-Setup.exe. PR 13 also distributes that setup asLongshotBuilder.exe. Tie the versions to the release and choose consistent metadata for the distributed names. The numeric product version exists; it is the string and release-specific values that are missing.Options, not a decision for the maintainers
Microsoft's signing comparison currently gives these approximate costs; they are published estimates, not a quote for this team:
SignPath's conditions also call for consistent product names/versions, an explicit Code signing policy naming committers/reviewers/approvers, a privacy statement, MFA, an uninstall route, and eligible open-source components. Whether Longshot and its Forgejo builds meet those conditions is for SignPath and the maintainers to settle. Hookshot's old application discussion is not confirmation of an application or approval for the new team and repositories.
Anything else
Microsoft's SmartScreen guidance distinguishes file-hash reputation from publisher reputation. A consistent trusted signing identity lets reputation accumulate across releases, but a newly signed file can still warn. Self-signed certificates do not establish public trust, and EV certificates no longer skip this process. Malware classification is a separate question; a false-positive submission is not a request to switch off SmartScreen.
The locally compiled
longshot.exeis another boundary: signing the distributed builder or launcher does not sign each player's game. Smart App Control can block unsigned programs without positive reputation, including locally built ones. The docs should explain that limit separately, not promise that signing the launcher fixes it or recommend disabling security as a general remedy.Nothing here was tested on Windows or against an antivirus. The old Hookshot executable's size, hash, unsigned status and release/issue counts are not measurements of Longshot and are not being carried over as current evidence.
Two questions:
Who signs remains the maintainers' decision: it carries a legal identity, costs money or approval time, and can be revoked. I can offer the repository-side preparation once that scope is agreed.
Moved from NotRexed/Hookshot#2919.
The release rework is now merged in Longshot #13 and LongshotLauncher #1. It uses one P-256 key over
SHA256SUMS, not the earlier manifest/channel-pointer design. The public key is present. That authenticates release downloads to the launcher; it does not give a Windows EXE a verified publisher.The repository-side first slice is pull request 98 (work in progress): optional signing of the compiled setup and the WPF builder apphost before packaging, followed by verification of Windows trust, the selected certificate and a timestamp. The setup's top-level
LongshotBuilder.exeand Repair copy retain the same signed bytes. No third-party tools are re-signed. With no certificate configured, the log saysnot signed: no certificate configuredand the build remains unsigned. PRs never enter the signing step.The decisions that remain with maintainers are:
Buy/apply now, or stay explicitly unsigned? The optional step changes no default. Once a channel promises signed Windows files, missing configuration must also stop publication; which channels should carry that promise?
Which identity and service? These are estimates, not quotes:
Sources: Microsoft's comparison, current Artifact Signing prerequisites, and SignPath's conditions. Microsoft's comparison and service quickstart currently disagree on the list of eligible organization regions, so eligibility should be checked directly. No SignPath acceptance for Longshot is assumed.
Who holds and approves it? Please choose the legal certificate/account holder, a backup custodian, release approvers, budget owner and renewal/revocation contact. Both OV and EV now need suitable protected keys; the CA/Browser Forum rules permit approved hardware or qualifying cloud/signing services, not an ordinary exportable-key procurement plan. The prepared route selects a certificate already available through Windows' certificate store; it does not export a private key or implement Azure/SignPath APIs. A signing runner and its provider must deny PR workloads independently of workflow labels. Do not provision an identity on a general PR runner.
Coverage and metadata policy. The launcher is built in its own repository, from one Windows program copied into setup and portable forms; it still needs its own signing integration. The setup's fixed
1.0.0resources and missingProductVersion/copyright strings need release-specific values and an agreed publisher. Which publisher should both products display?Evidence so far: 12 signing decision/command/failure tests pass. An actual Linux stand-in signed a 1,536-byte authored PE with a temporary self-signed certificate (3,472 bytes after signing), verified its embedded signature and all three package paths with that certificate explicitly trusted for the test, and rejected a modified code section. It also checked the final zip's release checksum. The temporary keys were removed; no trust store was changed. This proves mechanics, not publisher trust. Windows PowerShell, a hardware/cloud provider, the timestamp server, SmartScreen/Defender behaviour and a real release workflow have not been exercised.
Microsoft's SmartScreen guidance still warns that new signed files can prompt. Signing these distributed tools also does not sign a player's locally compiled game. None of this recommends disabling security protection.
Evidence for this from one Windows 11 PC: Microsoft Defender's own detection history (
Get-MpThreatDetection), Nov 7-10, for Hookshot files from GitHub. Defender engine 1.1.26100.4, signatures 1.463.271.0, real-time and cloud protection on (MAPS advanced), tamper protection on. A person downloading the releases, not a lab.HookshotBuilder.exe, the setup (about 180 KB, unsigned, 5 different release builds)Trojan:Win32/Wacatac.B!ml(x2),Wacatac.H!ml,Wacatac.C!ml,Sabsik.EN.A!ml,Sabsik.FL.A!ml,Trojan:Win32/CloxerHookshotBuilder.zip(release asset)Trojan:Script/Sabsik.EN.A!mlv2.0.7,ultrawide)Trojan:Script/Sabsik.FL.A!ml,Trojan:Script/Wacatac.H!mlhookshot.exebuilt on this PC by the Builder, in its build folder and in the installed gameProgram:Win32/Contebrew.A!mlWhat this says:
!ml: cloud machine-learning verdicts, not a signature matching some code in the file. And the same program gets a different family name from one release to the next (Wacatac B, H, C, then Sabsik EN, FL). That is what a reputation call on a new, unsigned, never-seen-before file looks like: every release is a new hash with no prevalence, so it starts from zero each time.NotSigned), as is the installedHookshotBuilder.exe.Script/detections), so it isn't only the setup's own behaviour (downloading and starting the Builder).Program:...!ml, a potentially-unwanted-program class). Authenticode on release files can't cover this one: it is compiled locally and never signed. That deserves its own row: a player whose build is quarantined sees "the game doesn't start" or a missing exe, not a download warning.So signing (#98) is the right main fix: a stable publisher identity carries reputation across releases, where today every new hash starts over. Two cheaper things help meanwhile:
Script/verdicts hit the zips.I can re-run this on a Longshot release or a signed test build here when there is one (Defender on, downloaded through the browser, the detection read back the same way).
d4nkn3ss referenced this issue2026-11-13 05:35:34 +00:00
Follow-up: I tried to reproduce the detections on Longshot's own setup, and looked at what free signing exists. Same Windows 11 PC, Defender as before.
What I built and checked:
LongshotBuilder-Setup.exefrom main @316f9319, withbuild-windows.yml's own windres and clang commands, in two copies:Set-AuthenticodeSignature, SHA-256, DigiCert timestamp. Windows reads it asUnknownError, an untrusted root, as expected.Both were marked as downloads (
Zone.Identifier, ZoneId 3). Each then went through two checks:MpCmdRun -Scan -ScanType 3 -File ... -DisableRemediation, report only.IAttachmentExecute::Save()with a release download URL as its source. This is the call behind thewebfile:entries in the history I posted.Save())The Hookshot setups that were flagged are 5 files, still on this PC after the player's allow. They now scan clean on demand too.
What this suggests:
webfile:, cloud "first sight"). The same files pass days later, so their reputation has built up. A fresh build checked locally doesn't trip it either, so nobody can reproduce or test the false positive before release. The time it bites is the first hours after a release, when many people download a brand-new hash.Free or cheap certificates, for whoever decides:
Let's Encrypt doesn't issue code-signing certificates, and Sigstore signatures aren't Authenticode, so neither helps Defender or SmartScreen.
When a signed test build exists, I'll run it through the same two checks, and through a real browser download, here.
Jer9 referenced this issue2026-11-16 04:14:59 +00:00
theguyser referenced this issue2026-11-16 13:51:42 +00:00
Krz referenced this issue2026-11-17 00:44:46 +00:00
StebanPi referenced this issue2026-11-24 17:17:07 +00:00
From MagicBeanDev/LongshotLauncher#419 (closed as a duplicate of this one):
Launcher-specific follow-up to the same proposal: also enforce channel-specific keys for launcher self-updates, document key rotation so a launcher trusting both keys ships before retiring the old key, and decide who may merge to main or manually start releases.