feat(switchdash): build unsigned Windows releases (CHOO-1468) - #204
Merged
Conversation
|
Semgrep found 4 GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. |
Windows was configured for Azure Trusted Signing but no Authenticode identity exists, and electron-builder selects its signing backend from the presence of `azureSignOptions` rather than from whether credentials are available. Any `--win` build therefore committed to the Azure path and failed in PowerShell, so no Windows artifact could be produced at all. Drop the key so the signtool backend is selected instead: it finds no certificate and skips signing. That also keeps `publisherName` out of app-update.yml, which matters because electron-updater verifies an installer's Authenticode signature whenever the manifest names a publisher — an unsigned build that named one would reject every update it downloaded. Add a windows-latest job alongside the other platform builds, publishing the .exe/.msi with latest.yml and the blockmaps. It carries no secrets, so unlike the macOS job it stays dispatchable from a branch. Add it to publish-release's gate and require latest.yml among the channel manifests, so a tagged Release cannot go public without the Windows update feed. Windows installs now warn via SmartScreen and are blocked outright by AppLocker/WDAC on managed machines; both are documented in INSTALL.md, along with Docker-backed features remaining macOS/Linux only. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
amaudruz
force-pushed
the
feature-request/switchdash-windows-support
branch
from
August 11, 2026 18:36
01861a0 to
195bba0
Compare
…ts (CHOO-1468) publish-release refuses to publish a tagged Release without latest.yml, so a dispatch run should be able to show whether the Windows build produced one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
amaudruz
added a commit
that referenced
this pull request
Aug 12, 2026
- Linux arm64 desktop artifacts, built + published alongside x64 (#202) - Windows x64 releases, built + published unsigned (CHOO-1468, #204) - Codex session runtime version derives from the artifact registry; drop the SWITCH_AGENT_RUNTIME_VERSION constant + parity test (#198) Version mirrored in artifacts.yaml; derived modules regenerated; artifacts-check passes. No contract revisions changed. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Jira: CHOO-1468
First slice of the Windows umbrella: produce a Windows build that people can actually install. Signing is explicitly out of scope — the agreed tradeoff is that users click through a SmartScreen warning.
Why there was no Windows build
Not a missing runner. The config demanded signing and there was nothing to sign with.
electron-builder.config.tssetazureSignOptionsunconditionally — publisherGeneral Action, Inc., accountswitchdash, profileswitchdash-public, all inherited from the upstream fork and none of them ours. electron-builder picks its signing backend from that key's presence, never checking whether credentials exist, so every--winbuild committed to Azure Trusted Signing and died in PowerShell.macOS already solves the same problem (
hasDeveloperIdCertgates notarization, ad-hoc signs otherwise). Windows never got an equivalent.The non-obvious part
Dropping the signing isn't sufficient on its own.
publisherNamealso gets stamped intoapp-update.yml, andNsisUpdater.verifySignaturechecks a downloaded installer's Authenticode signature against it. An unsigned build that still named a publisher would reject every update it downloaded.Removing the key fixes both:
computedPublisherNameresolves tonull, so the manifest carries no publisher and the updater skips verification.Verified against
app-builder-lib@26.15.2rather than assumed —WindowsSignToolManager.initialize()is a no-op,cscInforesolves tonullwithout a cert, andsignFilelogsno signing info identified, signing is skippedand returns.Why remove rather than gate on an env var
An
AZURE_CLIENT_IDgate would have kept a config that cannot work (wrong publisher, wrong account) and made build success depend on ambient environment — that variable appearing on a runner for any unrelated reason would flip the build to the Azure path and hard-fail it. Restoring signing means supplying a real identity, which means editing these lines regardless.Changes
azureSignOptionsfromelectron-builder.config.tsandelectron-builder.canary.config.ts, with a comment on why it must not return unaccompanied.build-windowsjob onwindows-latesttoswitchdash-release.yml, mirroring the macOS job. Publishes.exe,.msi,.blockmap,latest.yml.shell: bashat job level (runner defaults to pwsh).INSTALL.md: Windows install steps, the SmartScreen click-through, AV quarantine, and that AppLocker/WDAC block unsigned binaries outright with no click-through. Notes Docker-backed features stay macOS/Linux only.Testing
The Windows job has not run yet. It can't be exercised locally — no Wine, and the
msitarget needs it off-Windows. Native module rebuild (better-sqlite3,node-ptycompiling against MSVC) is the likeliest failure point. Suggest aworkflow_dispatchrun before tagging.Out of scope
Docker CLI resolution on Windows (per product decision — managed local/remote servers aren't needed on Windows yet), orphaned child processes on session teardown, SSH key auth, secrets file permissions. Each is a separate slice under the umbrella.
Noticed, not fixed
INSTALL.mdsays macOS builds are unsigned and need a Gatekeeper bypass; the workflow's release notes say signed and notarized. Contradiction predates this branch.VITE_SWITCHDASH_AUTOUPDATE=offas disabling auto-update. That variable exists nowhere in the repo; auto-update is live.🤖 Generated with Claude Code