Idea: Authenticode signing for the Windows builder and launcher, separate from signed release manifests #46
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
needs measurements
question
testing wanted
wontfix
No milestone
No project
No assignees
1 participant
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.