Skip to content

Sign the Windows installer with Azure Trusted Signing#45

Open
TheOrcDev wants to merge 1 commit into
mainfrom
feat/windows-trusted-signing
Open

Sign the Windows installer with Azure Trusted Signing#45
TheOrcDev wants to merge 1 commit into
mainfrom
feat/windows-trusted-signing

Conversation

@TheOrcDev

Copy link
Copy Markdown
Owner

What

The windows.yml installer job now signs the Windows installer with Azure Trusted Signing whenever the AZURE_TENANT_ID / AZURE_CLIENT_ID / AZURE_CLIENT_SECRET repo secrets are present, so testers stop hitting the SmartScreen "Unknown publisher" warning. Fork PRs (no secrets) keep building unsigned instead of failing.

How

  • apps/desktop/electron-builder.windows-signed.yml — new overlay (extends the base config) holding win.azureSignOptions. It's a separate file on purpose: electron-builder 26 hard-fails any build that has azureSignOptions configured without Azure credentials in the environment, so the base config must stay credential-free for fork PRs and local boxes. Config resolution verified locally via app-builder-lib: the base win block (icon, dir/nsis targets, backend + ffmpeg extraResources) survives the merge.
  • windows.yml — the installer job branches on AZURE_CLIENT_ID presence (signed vs unsigned script), then a fail-closed step asserts Get-AuthenticodeSignature returns Valid whenever signing was requested — a broken signature fails the job rather than shipping as an artifact.
  • pnpm dist:desktop:windows:signed — signed variant of the Windows dist pipeline (same backend/ffmpeg/preflight steps, signed electron-builder config).
  • docs/windows-signing.md — owner runbook for the Azure side: Trusted Signing account (West Europe / Basic), individual identity validation, Public Trust cert profile, CI service principal with the Certificate Profile Signer role, and the three gh secret set commands.

Not in this PR (blocked on the Azure account existing)

  • The overlay's codeSigningAccountName / certificateProfileName / endpoint assume the names suggested in the runbook — adjust if the created resources differ.
  • publisherName for electron-updater signature verification — set once the cert is issued (TODO in the overlay), matters when the Windows auto-update feed ships.

Verification

  • pnpm format:check green.
  • Overlay config resolution checked with app-builder-lib's own getConfig (merge preserves the base win block).
  • This PR's own Windows CI run exercises the unsigned fallback path end to end (no secrets configured yet). The signed path gets proven by the first run after the secrets land — the new verify step makes that run fail-closed.

🤖 Generated with Claude Code

The windows.yml installer job now builds a signed installer whenever the
AZURE_TENANT_ID/AZURE_CLIENT_ID/AZURE_CLIENT_SECRET repo secrets are
available, and falls back to the unsigned build on fork PRs. Signing
config lives in a separate electron-builder.windows-signed.yml overlay
because electron-builder 26 hard-fails any build that has
win.azureSignOptions without Azure credentials in the environment. A
fail-closed CI step asserts Get-AuthenticodeSignature returns Valid
whenever signing was requested. Azure-side setup (account, identity
validation, cert profile, service principal, secrets) is documented in
docs/windows-signing.md; the overlay's account/profile names must match
what gets created there.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@TheOrcDev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 23 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 35a0e46e-9925-454d-8e92-187507d1341c

📥 Commits

Reviewing files that changed from the base of the PR and between ffe5a6a and 8840655.

📒 Files selected for processing (6)
  • .github/workflows/windows.yml
  • apps/desktop/electron-builder.windows-signed.yml
  • apps/desktop/electron-builder.yml
  • apps/desktop/package.json
  • docs/windows-signing.md
  • package.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/windows-trusted-signing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant