Repository navigation
feat(release): code signing ready to switch on, and a code signing policy - #51
Merged
Merged
Conversation
The daemon's executable had no version information at all. It now carries the product name "Botloft", the description "Botloft background service", the crate's version and the copyright, from a VERSIONINFO block in botloftd.rc that build.rs fills in. Windows shows it in the file's properties and in Task Manager, a code signing service checks it against the product it signs, and a binary with no metadata is one of the things antivirus heuristics distrust.
… is a certificate scripts/sign.mjs signs one binary with signtool and the certificate picked by BOTLOFT_SIGN_THUMBPRINT from the Windows certificate store, timestamps it and checks the result. Without the variable it does nothing, so dev builds and releases made before the certificate exists stay unsigned; with it and no certificate it fails, so a release never goes out unsigned by mistake. Tauri runs it (bundle.windows.signCommand) for everything that goes into the installer: the app, the daemon, the NSIS plugins, the uninstaller and the installer itself. setup.mjs runs it for the setup window. release.yml passes the repository variables. The updater's signature and the build attestation are made afterwards, over the signed files. Spec 15.5 describes it, the certificate options looked at for an individual in Brazil, and the Defender false positive on 0.6.0 that made signing necessary; 15.7 records the real update from 0.5.0 to 0.6.0.
… the computer Says that releases are not signed yet and what that means, how releases are made and approved, who may release, what goes over the network (the update check and the bots' own Claude Code), what Botloft changes on the computer (per-user install, the scheduled task, the startup entry, keep awake) and how to remove it. The README links to it from the privacy section and from the FAQ.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Botloft's releases are still unsigned, and 0.6.0 showed why that matters: Microsoft Defender's machine-learning detection quarantined the installer and then the installed app on the owner's PC (
Wacatac.C!ml, a false positive, reported to Microsoft). This PR gets everything ready for a certificate, without one yet.app/scripts/sign.mjs <file>signs a binary withsigntooland the certificate picked byBOTLOFT_SIGN_THUMBPRINTfrom the Windows certificate store, timestamps it (RFC 3161) and checks the result.bundle.windows.signCommand) for everything that goes into the installer:Botloft.exe, thebotloftd.exesidecar, the NSIS plugins, the uninstaller and the installer.setup.mjsfor the setup window, which Tauri does not build.release.ymlpasses the repository variablesBOTLOFT_SIGN_THUMBPRINTandBOTLOFT_SIGN_TIMESTAMP.botloftd.exehas version information. It had none. Now: product "Botloft", description "Botloft background service", the crate's version and the copyright. A signing service checks this, and a binary with no metadata is one of the things antivirus heuristics distrust.docs/code-signing-policy.md, linked from the README): the status (not signed yet), how releases are made and approved, who may release, what goes over the network, what Botloft changes on the computer and how to remove it.Tests
cargo fmt,cargo clippy --workspace --all-targets -D warningsand the daemon's tests pass; Biome passes.sign.mjswithout the variable: prints "not signing" and exits 0. With a thumbprint that does not exist: findssigntoolin the Windows SDK and fails with "No certificates were found".pnpm bundlelocally: Tauri called the script for the sidecar,Botloft.exe, five NSIS plugins, the uninstaller and the installer, and the installer was built. Only the updater signature step failed, since that key lives in CI.node scripts/setup.mjs --rehearse: the setup window went through the script too.botloftd.exenow shows its product, description, version and copyright in its file properties.Still to do, once there is a certificate
BOTLOFT_SIGN_THUMBPRINT, then check a real signature on a release and scan it again.