Repository navigation
Conversation
…cher Add standard PE assembly attributes, an application manifest with requestedExecutionLevel=asInvoker, and the application icon to the native Windows CLI launcher (orca.exe). This provides proper PE provenance and OS compatibility declaration, mitigating heuristic malware detections by enterprise EDR solutions (e.g. SealSuite, Defender) on unsigned builds.
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes
- Launcher PE metadata — adds standard
Assembly*attributes toOrcaCliLauncher.csso the compiledorca.execarries Company/Product/FileDescription version info. - Embedded manifest and icon — new
app.manifest(asInvoker, supportedOS GUIDs) plus/win32manifestand/win32iconpassed tocsc.exewhen the files exist. - Rebuild predicate —
shouldReuseCompiledWindowsCliLaunchernow also treats a newerapp.manifestas stale. - Integration test — a Windows-only test compiles the launcher and asserts
VersionInfoCompany/Product/Description. - Incidental — both
.mjsfiles were rewritten from single-quote/no-semicolon style to double quotes/semicolons across the whole file.
ℹ️ Nitpicks
- The new
manifestPathbranch inshouldReuseCompiledWindowsCliLauncheris not exercised by any test — the reuse test passes nomanifestPath, and the metadata test exercises compilation rather than the predicate.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| import { existsSync, mkdirSync, statSync } from 'node:fs' | ||
| import { dirname, join, resolve } from 'node:path' | ||
| import { pathToFileURL } from 'node:url' | ||
| import { spawnSync } from "node:child_process"; |
There was a problem hiding this comment.
This file (and build-windows-cli-launcher.test.mjs) was reformatted to double quotes and semicolons throughout, but .oxfmtrc.json sets singleQuote: true and semi: false. npx oxfmt --check fails on both files, so pnpm format or the lint-staged pre-commit hook will revert this churn — please re-run pnpm format so the diff isolates the functional change.
Technical details
# Formatter config conflict
## Affected sites
- `config/scripts/build-windows-cli-launcher.mjs` — imports/statements re-quoted with `"` and terminated with `;`
- `config/scripts/build-windows-cli-launcher.test.mjs` — same
## Required outcome
- Both files match `.oxfmtrc.json` (`singleQuote: true`, `semi: false`, `printWidth: 100`, `trailingComma: none`) and pass `oxfmt --check`.| ['/nologo', '/target:exe', '/optimize+', '/warnaserror+', `/out:${outputPath}`, sourcePath], | ||
| { cwd: repoRoot, stdio: 'inherit' } | ||
| ) | ||
| if (existsSync(iconPath)) { |
There was a problem hiding this comment.
The launcher now consumes resources/build/icon.ico as a compile input, but the reuse predicate only tracks sourcePath and manifestPath, so a changed icon will not force a rebuild — neither through the local reuse shortcut nor through the CI cache (the cache key hashes native/windows-cli-launcher/**, not resources/build/). Pass iconPath alongside manifestPath and add the icon to the cache-key hash.
Technical details
# Icon is not an invalidation input
## Affected sites
- `config/scripts/build-windows-cli-launcher.mjs:129` — `/win32icon` consumes `iconPath`, but `shouldReuseCompiledWindowsCliLauncher` never sees it
- `.github/workflows/pr.yml:1082` — cache key hashes `native/windows-cli-launcher/**` and the build script, not `resources/build/icon.ico`
## Required outcome
- A newer `resources/build/icon.ico` triggers recompilation, and the Actions cache is invalidated when it changes.| ); | ||
|
|
||
| itWindows( | ||
| "embeds assembly metadata and application manifest into compiled launcher", |
There was a problem hiding this comment.
The test name says it verifies the application manifest, but it only reads VersionInfo (Company/Product/FileDescription), which comes from the assembly attributes — it would still pass if /win32manifest were dropped. Either narrow the name or assert something manifest-specific (e.g. read the raw bytes for requestedExecutionLevel/asInvoker).
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthroughThe Windows CLI launcher source now includes assembly metadata, and a Windows application manifest was added. The build script checks the manifest timestamp when deciding whether to reuse an existing executable. When available, the build passes the manifest and icon to the compiler. Tests cover reuse decisions, compilation and runtime behavior, environment handling, and executable metadata. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: 🔵 Low · up to An icon change may not appear in a rebuilt Windows launcher until its cached executable is replaced. This is bounded and does not block merging, but both reuse paths should be corrected. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The launcher now requests the invoking user's privileges and gains identifying metadata, but the packaged executable is not always checked for the intended manifest and icon. The identified exposure is limited to Windows launcher packaging; no new runtime privilege or remote entrypoint is shown. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation The changes implement the metadata and Full details: Docstring CoverageExplanation Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 3 files. (1 skipped: 1 unsupported.)
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.
Actionable comments posted: 2
🧹 Nitpick comments (1)
config/scripts/build-windows-cli-launcher.test.mjs (1)
304-304: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAssert a field unique to
app.manifest.
VersionInfochecks assembly metadata, not the embedded Win32 manifest. The expected version fields come from assembly attributes inOrcaCliLauncher.cs, so the test can still pass if/win32manifestis omitted. The compiler then embeds its defaultasInvokermanifest instead of the custom assembly identity and compatibility declarations.Inspect the manifest resource and assert a unique value, such as
StablyAI.Orca.CliLauncheror a supported OS declaration. The current build passes/win32manifest; this adds regression coverage for that integration.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: cd4c03c2-2a03-4f99-a86e-c85ef107a9d0
📒 Files selected for processing (4)
config/scripts/build-windows-cli-launcher.mjsconfig/scripts/build-windows-cli-launcher.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; 9 remain after this review.
| // does not preserve mtimes, so a hit would look stale and recompile anyway. | ||
| if (reuseCached) { | ||
| return true | ||
| return true; |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
rg -n -C 8 'ORCA_REUSE_WINDOWS_CLI_LAUNCHER|windows-cli-launcher|app\.manifest|icon\.ico|hashFiles' .github/workflowsRepository: stablyai/orca
Length of output: 32369
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- tracked launcher files ---'
git ls-files native/windows-cli-launcher config/scripts/build-windows-cli-launcher.mjs .github/workflows/pr.yml | sort
printf '%s\n' '--- build script ---'
cat -n config/scripts/build-windows-cli-launcher.mjs
printf '%s\n' '--- workflow cache/build block ---'
sed -n '1076,1088p' .github/workflows/pr.ymlRepository: stablyai/orca
Length of output: 5731
Include the icon in the cached-launcher key.
The key already includes app.manifest. It does not include resources/build/icon.ico. When the icon changes, the cache can restore an executable with the old icon, and ORCA_REUSE_WINDOWS_CLI_LAUNCHER=1 reuses it.
🐛 Suggested fix
- key: windows-cli-launcher-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('native/windows-cli-launcher/**', 'config/scripts/build-windows-cli-launcher.mjs') }}
+ key: windows-cli-launcher-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('native/windows-cli-launcher/**', 'resources/build/icon.ico', 'config/scripts/build-windows-cli-launcher.mjs') }}| if ( | ||
| manifestPath && | ||
| existsSync(manifestPath) && | ||
| outputMtime < statSync(manifestPath).mtimeMs |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Invalidate ordinary reuse when the icon changes.
If only resources/build/icon.ico changes, this check still reuses the old executable. The next build therefore retains the old embedded icon. Pass iconPath into the reuse check and compare its modification time with the output, as you do for the manifest.
|
Thank you for this — you diagnosed the right gap, and your diagnosis is what drove the fix that shipped. Closing because #23680 landed the equivalent change on Credit where it's due: your issue report (#23383) and discussion #23332 identified both halves of the problem — the missing PE provenance and the unsigned nested binaries. The second half turned out to be the actual root cause: v1.4.214 and v1.4.215 shipped a signed installer wrapping unsigned inner binaries because the CI step that downloads signed artifacts from SignPath had For the record, the deltas between this PR and what landed, in case they're useful to you:
Current state: v1.4.217 signs every inner binary with SignPath Foundation — verified against the published installer asset, not just CI logs — and the evidence gate now names We've also grouped every AV/EDR report by root cause in #23999. Thanks again for the thorough report — it was the most actionable one in the thread. |

ELI5
Give the native Windows CLI launcher binary (
orca.exe) standard metadata, an application manifest, and an application icon so Windows security tools and enterprise EDRs recognize it as a legitimate Orca application rather than flagging it as an anonymous malicious file.What Changed
native/windows-cli-launcher/app.manifestspecifyingrequestedExecutionLevel level="asInvoker"and Windows OS compatibility GUIDs (Windows 7/8/8.1/10/11).AssemblyTitle,AssemblyDescription,AssemblyCompany,AssemblyProduct,AssemblyCopyright,AssemblyVersion,AssemblyFileVersion) tonative/windows-cli-launcher/OrcaCliLauncher.cs.config/scripts/build-windows-cli-launcher.mjsto pass/win32manifestand/win32icontocsc.exewhen available, and factored the manifest mtime intoshouldReuseCompiledWindowsCliLauncher.config/scripts/build-windows-cli-launcher.test.mjsverifying that the compiled binary embeds the expected PE version information.Why
In enterprise environments with endpoint detection and response (EDR) software (such as ByteDance SealSuite, Microsoft Defender for Endpoint), the nested Windows CLI launcher (
resources/bin/orca.exe) was being quarantined as malware (reported in #23383 and discussion #23332).Because the binary previously lacked PE assembly metadata, an embedded manifest, and an application icon, its compilation signature from
csc.exein%LOCALAPPDATA%closely matched dropper heuristics. Providing complete PE provenance and an explicit non-elevatedasInvokermanifest mitigates these heuristic detections.Linked Issue
Fixes #23383
Visual Proof
N/A(No visual or UI change; this modifies the PE headers, manifest, and icon metadata of the native Windows CLI launcher executable).Testing
Ran
npx vitest run config/scripts/build-windows-cli-launcher.test.mjson Windows 11:embeds assembly metadata and application manifest into compiled launchertest).(Get-Item orca.exe).VersionInfothat CompanyName (Stably AI), ProductName (Orca), and FileDescription are properly populated in the PE headers.AI Disclosure
Developed with pair programming assistance from Google Deepmind Antigravity.
Review
build-windows-cli-launcher.mjscontinues to guard execution for Windows only; manifest and icons are conditionally passed only when they exist./optimize+with reuse caching intact.asInvoker(no UAC elevation).Notes
Cross-platform impact: None. Only the Windows CLI launcher compilation path is affected.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)