Repository navigation
fix(windows): require signed release binaries and identify CLI launcher - #23680
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe launcher build generates release-derived version metadata, embeds an application manifest and icon, and uses content fingerprints to control executable reuse. The Windows release workflow requires inner-binary signing and validates restored signatures before publication. The workflows also verify CLI binaries and uninstaller signing, and report signing failures through Slack. Tests cover the updated build and signing requirements. Priority: ⬆️ High Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The Windows release changes are mergeable after normal checks. Production-certificate signing and an enterprise EDR retest remain unperformed, but neither establishes a current defect. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Windows publication now depends on successful signing and verification of the binaries inside the installer. The review found no supported security regression, though the available evidence does not establish complete coverage of every release path. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 6 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Restore the uninstaller from an exact path. · release-cut.yml:1755-1756
.github/workflows/release-cut.yml:1755-1756
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winRestore the uninstaller from an exact path.
The recursive lookup can select the wrong
orca-uninstaller.exewhen the returned SignPath artifact contains more than one matching file. Use the same two-candidate check as the inner-binary restore, and then verify the single selected file.♻️ Suggested fix
- $signed = Get-ChildItem -Path signed-inner -Recurse -File -Filter 'orca-uninstaller.exe' | - Select-Object -First 1 - if ($null -eq $signed) { + $candidates = @( + (Join-Path 'signed-inner' 'uninstaller\orca-uninstaller.exe'), + (Join-Path 'signed-inner/signing-stage' 'uninstaller\orca-uninstaller.exe') + ) | Where-Object { Test-Path -LiteralPath $_ -PathType Leaf } + if (@($candidates).Count -ne 1) { throw 'SignPath did not return uninstaller/orca-uninstaller.exe; check the windows-inner-binaries-zip artifact configuration covers it.' } + $signed = Get-Item -LiteralPath @($candidates)[0]
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 776b45d8-5c50-4215-9388-55be983aac18
📒 Files selected for processing (8)
.github/workflows/pr.yml.github/workflows/release-cut.ymlconfig/scripts/build-windows-cli-launcher.mjsconfig/scripts/build-windows-cli-launcher.test.mjsconfig/scripts/replace-cached-nsis-elevate.test.mjsconfig/scripts/windows-signing-workflow-contract.test.mjsnative/windows-cli-launcher/OrcaCliLauncher.csnative/windows-cli-launcher/app.manifest
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — one verification gap worth a look, plus a nitpick.
Reviewed changes
- Windows signing chain is now fail-closed — every inner-signing step (
Stage unsigned inner PE files, upload, submit, download, restore inner, restore uninstaller, elevate cache swap, rebuild) dropscontinue-on-errorand its warn-and-continue fallback; the pre-rebuild backup and theRoll back to original installer after failed rebuildstep are deleted, andORCA_WINDOWS_INNER_SIGNATURE_REQUIREDflips to'true'. - Restored artifacts now match exact paths — the case-insensitive suffix match (
-like "*$relative", which also matchedresources\bin\orca.exeagainstOrca.exe) is replaced by the two exact candidatessigned-inner/$relativeandsigned-inner/signing-stage/$relative, requiring exactly one valid SignPath signature; the gate additionally requiresOrca.exeandresources\bin\orca.exe. - CLI launcher metadata —
OrcaCliLauncher.csgains assembly publisher/product/title/copyright, a newapp.manifestrequestsasInvoker, and the build script embeds version resources and compiles with/win32manifestand/win32icon. - Launcher cache reuse is content-keyed — mtime plus
ORCA_REUSE_WINDOWS_CLI_LAUNCHERbecomes a SHA-256 fingerprint over the.cs, manifest, icon, build script, andpackage.jsonversion, persisted asorca.exe.sha256; the PR cache key addsresources/build/icon.icoandpackage.json. - Tests cover fingerprint reuse, version-source validation, the Windows-only metadata/icon/manifest integration, and the new workflow contract. I ran the three changed suites (43 passed, 4 skipped on Linux) and the adjacent
windows-uninstaller-signing,windows-signing-gate-toolset,windows-pty-native-capability-workflow, andskills-cli-package-workflowsuites (34 passed).
ℹ️ Rehearsal still matches restored artifacts by suffix while release now matches exact paths
windows-signing-rehearsal.yml exists to prove the signing flow end to end, but the release's copy-back was made stricter here without changing the rehearsal's suffix match. The merge gate can therefore stay green while the release restore fails, and the release's two hardcoded roots are otherwise unverified (the PR notes no full SignPath run was done).
Technical details
# Rehearsal does not exercise the release restore path
## Affected sites
- `.github/workflows/release-cut.yml:1727-1735` — copies back only from `signed-inner/$relative` or `signed-inner/signing-stage/$relative` and fails the release when neither (or both) exists.
- `.github/workflows/windows-signing-rehearsal.yml:216-219` — still does `Get-ChildItem -Path signed-inner -Recurse -File | Where-Object { ... -like "*$relative" } | Select-Object -First 1`.
## Required outcome
- The rehearsal should exercise the same exact-path restore the release uses (or the release should retain a layout-tolerant match), so an artifact-layout mismatch is caught by the merge gate rather than a production cut.
## Open questions for the human
- Was the `signing-stage` prefix confirmed against the real `windows-inner-binaries-zip` artifact configuration? If SignPath returns the signed zip under any other wrapper, every release now blocks at restore.ℹ️ Nitpicks
ORCA_REUSE_WINDOWS_CLI_LAUNCHERis now dead:build-windows-cli-launcher.mjsno longer reads it, yet.github/workflows/pr.yml:1113still sets it andwindows-pty-native-capability-workflow.test.mjs:61/skills-cli-package-workflow.test.mjs:17still assert it. Drop the variable and those assertions, or keep the branch the tests describe.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Uninstaller restore now rejects ambiguous paths (
d3f2c24):Restore signed uninstaller for the installer rebuilddrops the recursiveGet-ChildItem -Recurse -Filter 'orca-uninstaller.exe' | Select-Object -First 1lookup for the same two-candidate exact-path check used by the inner-binary restore, and throws when zero or multiple candidates exist. This removes the last suffix/-First 1ambiguity from the restore path. - Contract test extended: the exact-path/single-candidate assertion now covers both
Restore signed inner binaries into unpacked appandRestore signed uninstaller for the installer rebuild.
I verified the candidate-count idiom behaves as intended under pwsh — a no-match pipeline assignment is AutomationNull, so @($candidates).Count is 0 and both restore steps fail closed rather than falling through to Get-Item $null. windows-signing-workflow-contract.test.mjs (20 tests) and replace-cached-nsis-elevate.test.mjs (20 tests, 1 skipped) pass.
The two notes from my prior review — the rehearsal still suffix-matching while release is exact-path, and the now-dead ORCA_REUSE_WINDOWS_CLI_LAUNCHER — are untouched by this commit and are not re-raised here.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: d2ac195e-6b8d-4164-acac-3c81314b10f2
📒 Files selected for processing (6)
.github/workflows/pr.yml.github/workflows/release-cut.yml.github/workflows/windows-signing-rehearsal.ymlconfig/scripts/skills-cli-package-workflow.test.mjsconfig/scripts/windows-pty-native-capability-workflow.test.mjsconfig/scripts/windows-signing-workflow-contract.test.mjs
💤 Files with no reviewable changes (3)
- config/scripts/windows-pty-native-capability-workflow.test.mjs
- config/scripts/skills-cli-package-workflow.test.mjs
- .github/workflows/pr.yml
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Rehearsal now runs the production restore scripts (
f92f9fb) —windows-signing-rehearsal.ymlreplaces its recursive-like "*$relative"suffix lookup with the same exact two-candidate check the release uses, and the contract test pinsrehearseRestore.run === restore.runfor both restore steps (Restore signed inner binaries into unpacked app,Restore signed uninstaller for the installer rebuild) so the merge gate fails as soon as the two drift. - Signing policy is explicit rather than implied (
203a880) — both restore steps takeSIGNING_POLICY; the release hardcodesrelease-signing, the rehearsal derives it frominputs.signing-policy-slug(defaulttest-signing), and$requireValid = $env:SIGNING_POLICY -ne 'test-signing'keeps the strictValid+ SignPath-subject check on for production while letting the rehearsal accept its untrusted test certificate. An unset policy stays strict. - Dead
ORCA_REUSE_WINDOWS_CLI_LAUNCHERremoved — dropped from thepr.ymlbuild step and from the two workflow tests that asserted it; the identifier now has zero references in the repo.
I ran the six affected suites at 203a8807a9 (61 passed, 4 skipped): windows-signing-workflow-contract, replace-cached-nsis-elevate, skills-cli-package-workflow, windows-pty-native-capability-workflow, windows-signing-gate-toolset, and build-windows-cli-launcher.
Both notes from the prior review are resolved by this delta: the rehearsal no longer suffix-matches while the release matches exact paths, and the now-dead launcher env flag is gone. The one residual item — confirming the windows-inner-binaries-zip layout against the exact candidates via a release-signing rehearsal run — is pre-existing and tracked in the PR body, so it is not re-raised here.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Rehearsal now verifies the CLI launcher too (
d49ec82) —Verify signatures end to endbuilds$targetsfrominner-signing-list.txtand appendsOrca.exeandresources\bin\orca.exe, mirroring the production evidence gate's$requiredTargetclause. A missing or stale CLI signature now fails the merge-gate rehearsal rather than surfacing only at release cut. - Contract test pins both gates —
requires the CLI signature at its electron-builder extraResources destinationderives the CLI payload path fromelectron-builder.config.cjsand asserts the required-target clause (foreach ($requiredTarget in @('Orca.exe', '<path>')), the-notcontainsappend, andforeach ($relative in $targets)) is present byte-for-byte in both the release gate and the rehearsal gate, so the two cannot drift.
Verified locally on this commit: windows-signing-workflow-contract.test.mjs (20 passed) and build-windows-cli-launcher.test.mjs (7 passed, 3 skipped). All Pullfrog-originated feedback from the prior rounds is addressed; no open Pullfrog review threads remain.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Slack alert on Windows signing failure (
6cd766c) — thebuildjob gainsNotify Slack when Windows signing fails, running onfailure()for thewinleg on the first attempt only. It is gated onsteps.install-signpath.outcomebeing neither empty norskipped, so a failure before signing starts does not alert, andcontinue-on-error: truekeeps Slack delivery from masking the original release failure. - Realistic recovery detail in the alert — the message carries the tag, an inferred stage (
installer signing or final signature verificationoncesubmit-signing-requesthas run, otherwiseinner-binary signing or installer rebuild), the run URL, links to whichever SignPath request IDs exist, and a note that a late approval or a re-run does not resume the failed cut. - Coverage of the actual signing gate — the step sits immediately after
Verify Windows inner binary signaturesand before the evidence upload / publish, so it fires for signing-step failures and both approval waits (inner 1h, installer 4h). - New contract test —
config/scripts/windows-signing-notification.test.mjspins theifexpression,continue-on-error, step ordering relative to the verify and publish steps, env wiring, and thePublication is blocked/ re-run guidance text.
I read the incremental range-diff against d49ec82, plus the surrounding workflow context, and ran windows-signing-notification.test.mjs and windows-signing-workflow-contract.test.mjs on this commit (21 passed). All prior Pullfrog review threads are resolved; nothing in this delta changes the open item already tracked in the PR body (a release-signing rehearsal run to confirm the windows-inner-binaries-zip layout).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
Windows releases can currently publish a signed installer containing unsigned Orca executables when inner signing times out. This change stops publication instead and gives the CLI launcher its publisher, product, release version, icon, and an explicit unelevated manifest.
What Changed
The production inner-signing chain now fails on staging, signing, restoration, or rebuild errors. It no longer restores an unsigned installer as a fallback. The shipped-payload gate is required and always checks Orca.exe and resources/bin/orca.exe, alongside staged binaries, elevate.exe, and the embedded uninstaller receipt. Signed artifact and uninstaller restoration use exact paths and reject ambiguous matches. The signing rehearsal runs the same restore scripts as production, with a contract test preventing drift. Production explicitly requires release signatures; the rehearsal can explicitly select test-signing to accept its untrusted test certificates. Missing or unknown policies keep the strict check.
Launcher compilation embeds release-derived version information and required manifest/icon resources. Its cache fingerprints all embedded inputs and the release version so a restored cache cannot silently retain old metadata.
Windows signing failures now notify the existing Slack channel with the release tag, signing phase, run link, request links, and recovery instructions. The alert covers signing-step failures and approval wait timeouts; Slack delivery is best-effort and cannot mask the release failure. Whole-job termination or runner loss can prevent this in-job alert.
Why
The v1.4.215 release run 36286365960 reports a signing timeout after one hour, skips restoration/rebuilding, and still signs the installer. On the Windows host
awin, the installed v1.4.215 launcher isNotSignedwith SHA-256F0017F38F43EA15542FAB3DEDF6F320E478EDEB43E9FD8CB5046DE49D87E7088, matching the issue report; the main executable is alsoNotSigned.Metadata alone cannot fix this release failure. This combines the provenance approach proposed in #23409 with mandatory production signing. Development builds retain their existing unsigned policy. A correctly signed release remains necessary to deliver the fix; these checks do not prove that every enterprise EDR policy will accept it.
Linked Issue
Fixes #23383
Visual Proof
N/A — build metadata and release-signing changes, with no UI change.
Testing
macOS: 7 focused test files, 86 passing tests and 3 Windows-only skips. Changed-code quality, scoped oxlint, oxfmt, and diff checks passed. After the restore and rehearsal updates, all 38 tests across the four affected signing/package workflow suites passed.
Windows (
awin, discovered withorca host listand operated through orca-cli): 5 launcher tests passed, with 2 non-Windows-only skips. Real compilation verified publisher/product/version, embedded icon and asInvoker manifest, multiline argument preservation, and duplicate PATH/Path inheritance. Parsed all 7 modified signing PowerShell scripts and executed the required gate against incomplete signing: it rejected publication. The workflow signature condition also passed 16 policy/signature combinations in Windows PowerShell, including missing/unknown policies and unsigned, untrusted, wrong-signer, and valid SignPath signatures. Temporary test files and test terminals were cleaned up.The end-to-end SignPath test-signing rehearsal passed at
203a8807a921: both archive restore steps, the installer rebuild, and signature presence in the final main executable, CLI launcher, and embedded uninstaller were verified. The uninstaller was read with 7-Zip’s NSIS handler; test certificates are intentionally untrusted. The laterd49ec82f6265change adds unconditional main/CLI verification when staging skips a previously signed file; both files were staged and checked in this run. Production-certificate signing and an enterprise EDR retest have not been run. No TypeScript or renderer code changed. The final PR CI run passed atd49ec82f6265, including all eight unit-test shards, Windows/Linux packaging, typecheck, static analysis, native smoke tests, and compatibility checks.The Slack alert follow-up passed 45 tests across five signing/package workflow suites, scoped lint/format, and the changed-code quality gate. No live Slack test message was sent; CI for this follow-up is separate from the successful
d49ec82f6265run above.Review
Exact signed artifact paths avoid the main/CLI executable suffix collision. Required payload targets are checked against the electron-builder resource layout in tests. Remote, folder workspace, Linux, and macOS runtime behavior is unchanged.
Agent skill upstream boundary
Notes
The signing timeout now fails the release rather than publishing unsigned inner executables. Existing rerun behavior is preserved: missing Windows assets require a fresh release dispatch. Signing approval remains required even if the Slack notification fails.
Checklist