Repository navigation
fix(setup): sync Windows CA certificates to WSL before CLI install - #819
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 5, 2026, 7:24 PM ET / 23:24 UTC. Summary Reproducibility: no. high-confidence live reproduction was run in this read-only review. Source inspection shows current main downloads the installer with WSL curl before any CA import, matching the reported corporate TLS-inspection failure mode. Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Land only after maintainers choose the default or opt-in trust policy and the PR body includes redacted current-head setup logs for both enterprise TLS-inspection and normal-network paths. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction was run in this read-only review. Source inspection shows current main downloads the installer with WSL curl before any CA import, matching the reported corporate TLS-inspection failure mode. Is this the best way to solve the issue? Unclear. The stdin/root transactional implementation is a stronger direction than the earlier UNC bundle, but the default trust policy and direct setup proof still need maintainer approval before it is the best merge path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b37b1bef0a0c. Label changesLabel justifications:
Evidence reviewedSecurity concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
On corporate/enterprise networks a TLS-intercepting proxy injects a self-signed certificate that WSL Ubuntu's curl does not trust, causing `install-cli` to fail with exit 60: curl: (60) SSL certificate problem: self-signed certificate in certificate chain Fix: add `SyncWindowsCaCertsStep` between `ValidateWslLockdownStep` and `InstallCliStep` that: 1. Reads the Windows LocalMachine\Root and \CA certificate stores using X509Store and serialises them to PEM format. 2. Writes the bundle directly to the WSL distro filesystem via the `\wsl$\<distro>\usr\local\share\ca-certificates\` UNC share that WSL2 exposes on Windows (no stdin piping required). 3. Runs `update-ca-certificates` as root inside WSL so curl picks up the new trust anchors for the install-script download. The step is intentionally non-fatal: if the Windows cert store cannot be read, the UNC path is unreachable, or update-ca-certificates warns, the step logs and continues so non-proxied setups are not affected. RollbackAsync removes the written bundle file on uninstall. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-authored-by: conanssam <[email protected]>
d2fbe02 to
f53b48c
Compare
Problem
On corporate/enterprise networks, a TLS-intercepting proxy can inject a certificate chain trusted by Windows but not by the fresh WSL Ubuntu instance. The gateway install then fails while downloading the OpenClaw CLI:
Fix
Add
SyncWindowsCaCertsStepimmediately beforeInstallCliStep:LocalMachine\RootandCurrentUser\Roottrust stores and deduplicate certificates by SHA-256.wsl.exeover stdin; no privileged\\wsl$filesystem write..crtfile with system-readable permissions, then rebuild the Debian trust store.The sync step remains non-fatal so machines that cannot read or update the Windows-derived roots still proceed to the normal installer diagnostics. Command stdin writes now share the existing timeout/cancellation policy, preventing a wedged WSL launch from hanging setup indefinitely.
Test plan
OpenClaw.SetupEngine.Tests— 375 passedbuild.ps1— Shared, CLI, WinNodeCLI, SetupEngine, and WinUI greenThe local Apple ARM VM cannot start nested WSL2 (
HCS_E_HYPERV_NOT_INSTALLED), so the repository's native Windows runner supplies the real WSL execution proof.Co-authored-by: conanssam [email protected]