Skip to content

fix(cloud): preserve OS trust and network policy for first-party traffic - #16399

Open
Minidoracat wants to merge 18 commits into
stablyai:mainfrom
Minidoracat:fix/first-party-os-certificate-trust
Open

Minidoracat wants to merge 18 commits into
stablyai:mainfrom
Minidoracat:fix/first-party-os-certificate-trust

Conversation

@Minidoracat

@Minidoracat Minidoracat commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

On inspected corporate networks, the browser can trust the company certificate while Orca's Node-based Cloud and Relay connections reject it. This makes sign-in look successful, then Cloud or Relay fails. Orca now uses the operating system's trust at the process that actually owns each first-party connection, while keeping certificate and hostname verification on.

What Changed

  • Desktop first-party HTTP stays on Electron/Chromium networking.
  • Headless, SSH, and paired-host first-party HTTP use one scoped Undici dispatcher.
  • Relay control and data WSS use one scoped secure context from the same trust source.
  • macOS trust loading is policy-verified and bounded to 10 seconds total.
  • Windows independently reads machine/user ROOT and Disallowed stores; inaccessible stores do not erase readable ones, and disallowed roots are removed from the final merged trust set.
  • No global CA/dispatcher mutation, certificate bypass, wire change, or third-party transport change.

The authoritative boundary is the host process performing the first-party request:

  • src/main/network/http-client.ts
  • src/main/network/first-party-ca-certificates.ts
  • src/main/network/first-party-tls-trust.ts
  • src/main/runtime/first-party-fetch.ts
  • src/main/runtime/first-party-relay-websocket.ts

Why

The reported failure is split trust authority: Chromium accepts the corporate TLS-inspection chain, while Node rejects the same chain during Cloud session exchange, Relay mint/assignment, and Relay control/data WSS.

Invariant: Node-hosted Orca Cloud and Relay HTTPS/WSS accept a host-trusted inspection chain without global trust mutation or disabling certificate or hostname checks.

Linked Issue

Fixes #13735

Related: #10758

Supersedes the landing path in #15208.

Visual Proof

N/A — this changes the network trust boundary and has no UI change.

Testing

The same byte-identical production-caller oracle was used for every comparison:

  • build SHA-256: bfbc12e7ca447081f2fc28d6b584ef4a3c6ab63160f7b0ca355bab1b9f36a663
  • entry SHA-256: 32e630510ae85cf39e8c18fab0b6d541d14686a40e7e49c1636fa81cfe1809b7
  • smoke SHA-256: a3433d39b9ff42ee920ab3a79050011cf4f3c2d211d54e1723b25246a5adea56
Variant Result Authoritative signal
reported v1.4.178 92a8100f698e red UNABLE_TO_VERIFY_LEAF_SIGNATURE
latest origin/main 5a8b4aff7b44 red same TLS cause
production candidate 50991cfa0558 green Cloud exchange, Relay mint/assignment, control/data WSS pass
candidate with complete src/main tree restored byte-for-byte from latest main red same TLS cause

Exact primary command:

node config/scripts/build-first-party-node18-trust-smoke.mjs && \
ORCA_FIRST_PARTY_TRUST_SMOKE_NODE_MAJOR=18 npx -y node@18 config/scripts/smoke-first-party-node18-trust.mjs

Independent oracle signals:

  1. The real production callers assert exact POST/content type/auth/body for Cloud PKCE, Relay mint/assignment, control WSS, and data WSS.
  2. The trusted CA still rejects HTTP and WSS hostname mismatches with ERR_TLS_CERT_ALTNAME_INVALID.

Completed locally on macOS:

  • focused changed suites: 20 files, 155 passed / 3 platform-skipped

  • additional post-rebase focused suite: 10 files, 64 passed / 3 skipped

  • real HTTPS/WSS smoke under Node 18, 24, and 26

  • full typecheck, lint, quality/reliability/max-lines/Electron/skill/localization gates

  • frozen install and build:unpack

  • packaged app codesign --verify --deep --strict

  • packaged Undici 6.28.0

  • real smoke:orcad-terminal server/worktree/terminal round trip

  • real Electron E2E: tests/e2e/first-party-electron-http-policy.spec.ts, 1/1 passed

  • I manually tested these changes locally

  • Automated tests added/updated

Review

Three fresh independent Luna reviews covered structural security, cross-platform compatibility, performance, and test-oracle quality. Valid findings were reproduced and fixed: HTTP method/content-type assertions, precise TLS causes, aggregate macOS timeout coverage, Windows partial-store recovery, and final merged Disallowed policy. Explicit WSS proxy tunneling remains out of scope; TLS validation is never disabled.

Known gap: no reporter has tested this exact rework on the original managed network. Keep the PR open until the signed ad-hoc build exercises all four Cloud/Relay legs on a managed network.

Required PR CI is now green: 51 jobs passed, including Windows packaging and first-party TLS on Node 18/24/26. A signed/notarized ad-hoc product build from 7a5b66fd33 is published for that field test; current HEAD 9df26bccc differs only by a POSIX test-fixture correction:

https://github.com/stablyai/orca-adhoc/releases/tag/v1.4.189-adhoc.20260826043417

The original reporter has been asked on #13735 to test Cloud handoff/session exchange, Relay mint, HTTP assignment, and control/data WSS.

Agent skill upstream boundary

  • Not applicable.

Notes

  • Mixed client/host versions need no wire change; the connection-owning host evaluates its own trust.
  • Folder workspaces are unaffected.
  • Trust is cached for the host process lifetime, so certificate-store changes require an Orca restart.
  • Native Windows certificate enumeration cannot be cancelled once started, but product wait is bounded to 10 seconds.
  • Explicit HTTP/SOCKS proxy tunneling for Relay WSS is a separate unsupported case.

Checklist

  • This PR is focused on the first-party network trust boundary
  • I explained what changed and why (including ELI5)
  • Visual proof is N/A because there is no UI change
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, folder workspace, and compatibility impact considered
  • Local lint, typecheck, focused tests, production build, packaging, Electron E2E, and daemon smoke pass; final-SHA PR CI is green

@coderabbitai

coderabbitai Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: df4d610c-ccba-4350-a522-f7815029bd63

📥 Commits

Reviewing files that changed from the base of the PR and between 7a5b66f and 9df26bcccfa1e3744e14c7a2796ce8f0811510a7.

📒 Files selected for processing (1)
  • src/main/network/first-party-ca-certificates.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/network/first-party-ca-certificates.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The change adds first-party HTTP and WebSocket transports with system TLS trust, proxy support, and fixed request policies. Cloud, artifact, organization-membership, Relay, and relay-region requests use the new HTTP boundary. Relay control and data sockets use first-party WebSocket factories. Runtime packaging and Windows native rebuild handling support the new dependencies. Node trust smoke tests, Electron policy tests, workflow checks, and reliability-gate metadata provide validation.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 56 functions across 43 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The implementation addresses issue #13735 by applying OS trust to first-party Cloud and Relay HTTPS/WSS traffic while preserving certificate and hostname verification, avoiding global trust mutation, …
Out of Scope Changes check ✅ Passed The code, tests, packaging updates, CI workflow, and reliability gate directly support the first-party trust objective. No unrelated product behavior or third-party transport changes are identified.
Title check ✅ Passed The title clearly identifies the main change: preserving OS trust and network policy for first-party Cloud and Relay traffic.
Description check ✅ Passed The description follows the repository template and covers the change, rationale, linked issue, visual proof, testing, review status, scope, risks, and checklist. It also clearly identifies the remain…
Full details: Linked Issues check

Explanation

The implementation addresses issue #13735 by applying OS trust to first-party Cloud and Relay HTTPS/WSS traffic while preserving certificate and hostname verification, avoiding global trust mutation, and supporting the relevant host environments.

Full details: Description check

Explanation

The description follows the repository template and covers the change, rationale, linked issue, visual proof, testing, review status, scope, risks, and checklist. It also clearly identifies the remaining managed-network verification gap.


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.

@Jinwoo-H
Jinwoo-H force-pushed the fix/first-party-os-certificate-trust branch from ac34d6f to cc53814 Compare August 25, 2026 20:55
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@Jinwoo-H Jinwoo-H changed the title fix(cloud): honor OS certificate trust for first-party traffic (rebase of #15208) fix(cloud): preserve OS trust and network policy for first-party traffic Aug 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e07725e0-8b04-48f4-a42c-363d1686b977

📥 Commits

Reviewing files that changed from the base of the PR and between bc98655 and cc538145d1baa171ef6db41d7229ee6a4cf752b6.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (24)
  • config/packaged-runtime-node-modules.cjs
  • config/scripts/package-electron-first-party-dispatcher-contract.test.mjs
  • package.json
  • src/main/artifacts/artifact-cloud-request.ts
  • src/main/global-fetch-call-site-audit.test.ts
  • src/main/host/electron-http-client.test.ts
  • src/main/host/electron-http-client.ts
  • src/main/jira/client.test.ts
  • src/main/network/first-party-tls-trust.ts
  • src/main/network/http-client.ts
  • src/main/orca-profiles/profile-cloud-client.ts
  • src/main/orca-profiles/profile-cloud-org-members-client.ts
  • src/main/runtime/first-party-fetch-proxy.test.ts
  • src/main/runtime/first-party-fetch.test.ts
  • src/main/runtime/first-party-fetch.ts
  • src/main/runtime/first-party-relay-websocket.test.ts
  • src/main/runtime/first-party-relay-websocket.ts
  • src/main/runtime/relay/relay-control-client.ts
  • src/main/runtime/relay/relay-http-client.test.ts
  • src/main/runtime/relay/relay-http-client.ts
  • src/main/runtime/relay/relay-region-preference.test.ts
  • src/main/runtime/relay/relay-region-preference.ts
  • src/main/runtime/rpc/relay-transport.ts
  • tests/e2e/first-party-electron-http-policy.spec.ts
🚧 Files skipped from review as they are similar to previous changes (13)
  • src/main/orca-profiles/profile-cloud-org-members-client.ts
  • src/main/runtime/relay/relay-region-preference.ts
  • src/main/artifacts/artifact-cloud-request.ts
  • package.json
  • config/scripts/package-electron-first-party-dispatcher-contract.test.mjs
  • src/main/runtime/rpc/relay-transport.ts
  • config/packaged-runtime-node-modules.cjs
  • src/main/orca-profiles/profile-cloud-client.ts
  • src/main/runtime/relay/relay-control-client.ts
  • src/main/runtime/relay/relay-region-preference.test.ts
  • src/main/runtime/relay/relay-http-client.ts
  • src/main/runtime/first-party-relay-websocket.ts
  • src/main/runtime/relay/relay-http-client.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@Jinwoo-H
Jinwoo-H force-pushed the fix/first-party-os-certificate-trust branch from cc53814 to 7e98a3e Compare August 25, 2026 22:18

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 264d47e3-bd5f-4ae1-a53f-6bc177a83e46

📥 Commits

Reviewing files that changed from the base of the PR and between cc538145d1baa171ef6db41d7229ee6a4cf752b6 and 7e98a3e468011962910fa47fe778196fd13c13cc.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (23)
  • .github/workflows/pr.yml
  • config/packaged-runtime-node-modules.cjs
  • config/reliability-gates.jsonc
  • config/scripts/build-first-party-node18-trust-smoke.mjs
  • config/scripts/ensure-native-runtime.mjs
  • config/scripts/first-party-node18-trust-smoke-entry.ts
  • config/scripts/package-electron-first-party-dispatcher-contract.test.mjs
  • config/scripts/pr-workflow-parallelism.test.mjs
  • config/scripts/rebuild-native-deps.mjs
  • config/scripts/smoke-first-party-node18-trust.mjs
  • package.json
  • src/main/index.ts
  • src/main/network/first-party-ca-certificates.test.ts
  • src/main/network/first-party-ca-certificates.ts
  • src/main/network/first-party-tls-trust-node18.test.ts
  • src/main/network/first-party-tls-trust.ts
  • src/main/network/http-client.ts
  • src/main/runtime/first-party-relay-websocket.test.ts
  • src/main/runtime/first-party-relay-websocket.ts
  • src/main/runtime/relay/relay-control-client.ts
  • src/main/runtime/rpc/relay-transport.test.ts
  • src/main/runtime/rpc/relay-transport.ts
  • tests/e2e/first-party-electron-http-policy.spec.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.

Comment thread src/main/network/http-client.ts Resolved
@Jinwoo-H
Jinwoo-H force-pushed the fix/first-party-os-certificate-trust branch 2 times, most recently from 3ea9c53 to 82a3473 Compare August 26, 2026 03:15
@Jinwoo-H

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/main/network/first-party-ca-certificates.ts (1)

8-16: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Use Node path utilities for certificate file paths.

  • src/main/network/first-party-ca-certificates.ts#L8-L16: Build the macOS and Linux certificate paths with path.join.
  • src/main/network/first-party-ca-certificates.ts#L126-L126: Build the /dev/stdin path with path.join.
  • src/main/network/first-party-ca-certificates.test.ts#L41-L45: Build the fixture path with path.join.

As per coding guidelines: “File paths: Use path.join or Electron/Node path utilities — never assume / or \.”

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b3af0151-03a5-4e46-aecd-f58e80fe49a4

📥 Commits

Reviewing files that changed from the base of the PR and between 5a8b4af and 82a3473.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (44)
  • .github/workflows/pr.yml
  • config/packaged-runtime-node-modules.cjs
  • config/reliability-gates.jsonc
  • config/scripts/build-first-party-node18-trust-smoke.mjs
  • config/scripts/first-party-node18-trust-smoke-entry.ts
  • config/scripts/package-electron-first-party-dispatcher-contract.test.mjs
  • config/scripts/pr-workflow-parallelism.test.mjs
  • config/scripts/rebuild-native-deps.mjs
  • config/scripts/rebuild-native-deps.test.mjs
  • config/scripts/smoke-first-party-node18-trust.mjs
  • package.json
  • src/main/artifacts/artifact-cloud-recovery.test.ts
  • src/main/artifacts/artifact-cloud-request.ts
  • src/main/artifacts/artifact-cloud-service-races.test.ts
  • src/main/artifacts/artifact-cloud-service.test.ts
  • src/main/global-fetch-call-site-audit.test.ts
  • src/main/host/electron-http-client.test.ts
  • src/main/host/electron-http-client.ts
  • src/main/index.ts
  • src/main/jira/client.test.ts
  • src/main/network/first-party-ca-certificates.test.ts
  • src/main/network/first-party-ca-certificates.ts
  • src/main/network/first-party-tls-trust-node18.test.ts
  • src/main/network/first-party-tls-trust.ts
  • src/main/network/http-client.ts
  • src/main/orca-profiles/profile-cloud-client.test.ts
  • src/main/orca-profiles/profile-cloud-client.ts
  • src/main/orca-profiles/profile-cloud-org-members-client.test.ts
  • src/main/orca-profiles/profile-cloud-org-members-client.ts
  • src/main/runtime/first-party-fetch-proxy.test.ts
  • src/main/runtime/first-party-fetch.test.ts
  • src/main/runtime/first-party-fetch.ts
  • src/main/runtime/first-party-relay-websocket.test.ts
  • src/main/runtime/first-party-relay-websocket.ts
  • src/main/runtime/relay/relay-control-client-options.ts
  • src/main/runtime/relay/relay-control-client.test.ts
  • src/main/runtime/relay/relay-control-client.ts
  • src/main/runtime/relay/relay-http-client.test.ts
  • src/main/runtime/relay/relay-http-client.ts
  • src/main/runtime/relay/relay-region-preference.test.ts
  • src/main/runtime/relay/relay-region-preference.ts
  • src/main/runtime/rpc/relay-transport.test.ts
  • src/main/runtime/rpc/relay-transport.ts
  • tests/e2e/first-party-electron-http-policy.spec.ts
🚧 Files skipped from review as they are similar to previous changes (28)
  • src/main/jira/client.test.ts
  • src/main/runtime/first-party-fetch.ts
  • src/main/index.ts
  • config/scripts/build-first-party-node18-trust-smoke.mjs
  • package.json
  • src/main/runtime/first-party-fetch.test.ts
  • src/main/host/electron-http-client.test.ts
  • config/scripts/first-party-node18-trust-smoke-entry.ts
  • src/main/global-fetch-call-site-audit.test.ts
  • src/main/orca-profiles/profile-cloud-org-members-client.ts
  • src/main/artifacts/artifact-cloud-request.ts
  • src/main/orca-profiles/profile-cloud-client.ts
  • src/main/runtime/relay/relay-region-preference.test.ts
  • src/main/runtime/relay/relay-region-preference.ts
  • src/main/network/http-client.ts
  • src/main/runtime/first-party-fetch-proxy.test.ts
  • config/scripts/smoke-first-party-node18-trust.mjs
  • src/main/runtime/first-party-relay-websocket.ts
  • src/main/runtime/rpc/relay-transport.test.ts
  • src/main/runtime/relay/relay-http-client.ts
  • src/main/runtime/rpc/relay-transport.ts
  • src/main/network/first-party-tls-trust.ts
  • src/main/runtime/relay/relay-http-client.test.ts
  • config/reliability-gates.jsonc
  • src/main/host/electron-http-client.ts
  • tests/e2e/first-party-electron-http-policy.spec.ts
  • config/scripts/package-electron-first-party-dispatcher-contract.test.mjs
  • config/packaged-runtime-node-modules.cjs

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@Jinwoo-H

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Jinwoo-H

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b9488da-1104-4db1-844b-9bdef827b39d

📥 Commits

Reviewing files that changed from the base of the PR and between bb1ea8d and 7a5b66f.

📒 Files selected for processing (2)
  • src/main/network/first-party-ca-certificates.test.ts
  • src/main/network/first-party-ca-certificates.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/network/first-party-ca-certificates.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@Jinwoo-H

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Jinwoo-H

Copy link
Copy Markdown
Contributor

Hi @Minidoracat! Could you test the latest signed ad-hoc build on the corporate/TLS-inspecting network where this issue originally occurred?

Build: v1.4.189-adhoc.20260826043417

Downloads:

Please test these four flows while connected to the managed/corporate network:

  1. Browser sign-in returns to Orca and the Cloud session completes.
  2. Relay pairing/token mint succeeds.
  3. A Cloud assignment starts successfully.
  4. Relay control and data WebSockets remain connected.

Please report the Orca version, OS version, which steps passed or failed, and any visible error code/message. Please do not share certificates, tokens, or other sensitive company information. Thank you!

@Minidoracat

Copy link
Copy Markdown
Contributor Author

Happy to test this — with one correction to the premise first, because it affects how you triage other reports.

This host is not a corporate or managed network. No proxy, no VPN, no corporate policy. The interception comes from a consumer-grade HTTPS-filtering tool installed locally, and it is per-application: on the same host, in the same minute, on the same network, a plain electron.exe sees the genuine upstream chain and validates fine against Electron's bundled roots, while the Orca process sees a locally re-signed chain and fails. Anyone asking an affected user "are you behind a TLS-inspecting proxy?" will be told "no" and will rule them out incorrectly — the useful question is what is installed locally.

I have not installed the build yet, since it would replace the Orca I am currently working in. But the Windows trust path can be validated without installing, and I think that covers the highest-risk part of your question.

Method. Injected into the already-intercepted Orca 1.4.188 main process (Electron 43.1.0) and ran the ad-hoc build's own win-export-certificate-and-key addon — bin/win32-x64-148 matches Electron 43 — together with its own bundled undici. The ROOT/Disallowed store split, the certificate.ca requirement and the validity window are transcribed verbatim from loadWindowsCertificates in the ad-hoc out/main/index.js.

Result.

ROOT store raw entries                 : 150
Disallowed store entries               : 0
after ca/validity/blocklist filtering  : 65
Node tls: system=142   bundled=120

served chain is intercepted             : yes (issuer is a local root)
interception anchor accepted by filter  : YES

CONTROL bundled roots only              => FAIL  UNABLE_TO_VERIFY_LEAF_SIGNATURE
ADHOC   bundled + ad-hoc Windows trust  => HTTP 400

HTTP 400 is the endpoint's structured rejection of a deliberately invalid authorization code — a complete TLS handshake plus HTTP round-trip. No credentials were used, and no certificate material is reproduced here.

So the ca === true + validity + Disallowed filtering does not discard this host's interception anchor, and a dispatcher built from that set reaches the real session endpoint while bundled-only still fails in the same process. Flow 1 should pass here. I will run all four flows end to end once I can take the app down, and report Orca version, OS build and per-step results then.

Two things worth flagging in the meantime:

  1. The Windows installer is not Authenticode-signed. X509Certificate2::CreateFromSignedFile on orca-windows-setup.exe throws Cannot find the requested object. That means a SmartScreen warning for anyone you hand this to — an awkward combination for a build whose whole purpose is trust-related testing. I only checked the Windows artifact; the macOS ones may well be signed.
  2. The review discussion settled on @vscode/windows-ca-certs, but this artifact ships win-export-certificate-and-key instead (@vscode contains only windows-process-tree). Not a problem in itself — the implementation reads ROOT across CERT_SYSTEM_STORE_LOCAL_MACHINE and CERT_SYSTEM_STORE_CURRENT_USER and subtracts Disallowed, which is a better shape than what my rebase carried. Flagging it only so the PR description and the resolved review threads do not diverge from the artifact.

One more data point that may be useful for the release notes or a workaround section: on an affected host, pointing NODE_EXTRA_CA_CERTS at a PEM containing the locally trusted anchor is sufficient as a stopgap, and it does reach the packaged Electron main process. Measured on 1.4.188 after a restart: default=122, bundled=120, extra=2, and sign-in completes. Nothing is disabled and no verification is weakened, so it is a safe thing to tell users while a fix is in flight.

Jinwoo-H and others added 4 commits August 27, 2026 01:40
The rebase onto current main lands on a package-electron-runtime-contract.test.mjs
that already sits at the max-lines ceiling (598 of 600 effective lines), so adding
the packaged-undici assertion there fails `pnpm lint`. Move that one contract into
its own file. The original suite returns to its main content unchanged, which also
removes the only conflict surface this branch had against main.

This branch has not been deployed

No deployments
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.

[Bug]: Cloud sign-in and Orca Relay fail silently behind TLS-inspecting corporate networks

2 participants