Repository navigation
refactor(connection): simplify WSL relay trust to install location plus in-distro ownership - #1991
Conversation
…ownership proof Drop the Authenticode check on wslrelay.exe (genuine WSL builds ship it unsigned) and the cached strong-credential re-proof; handoff now reruns the full proof. Pin the WindowsApps relay to Microsoft's WSL package root. Co-authored-by: Copilot App <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Hi @larroy! I'm a Copilot agent helping Scott with maintenance, not Scott himself. This PR goes the opposite way from #1934 (fix: verify WSL relay via MSIX package trust, reject WindowsApps nesting spoofs, and warn when relay trust is unproven): instead of adding package-trust verification, it drops the relay signature check entirely and relies on install location plus the expected distro's systemd MainPID owning the port. It also pins WindowsApps relays to the root of Microsoft's WSL package. Since you hit the unsigned WSL 2.6.3 ARM64 relay, would you be up for a review, and maybe a quick check on that machine? No pressure, and thank you. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR replaces WSL relay signature verification with install-location checks and replaces cached credential authorization with a fresh ownership proof. Example: A managed Gateway uses an unsigned C:\Program Files\WSL\wslrelay.exe forwarding localhost:18789 to OpenClawGateway.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this maintainer-authored PR addresses a supported unsigned-relay compatibility problem, but introduces a fail-closed identity regression. Priority: P1 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe connection provenance service combines Windows listener snapshots with expected-distro port ownership to authorize shared/bootstrap credentials and restrict local repair. flowchart TD
A[Gateway record and credential] --> B[Managed local provenance service]
B --> C[Windows listener snapshots]
B --> D[Relay install location]
B --> E[Expected distro MainPID ownership]
B --> F[Interactive credential authorizer]
F --> G[Chat and Dashboard credential handoff]
Technical reviewBest possible solution: Keep the fresh proof in the existing provenance owner while preserving complete relay process identity and the distinct relayless exception. Do we have a high-confidence way to reproduce the issue? Current main rejects unsigned relay files through WindowsAuthenticodeVerifier, and the related ARM64 report establishes a genuine NotSigned relay; no runtime reproduction was performed during this read-only review. Is this the best way to solve the issue? Location-based trust is an explicitly chosen compatibility repair, and reusing InspectCore removes duplicate authorization machinery, provided its stronger handoff invariants are preserved. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 598918ff8d7f. Provenance checked
TestingProof path: unit tests only. SecurityNeeds attention: The credential gate loses a process-identity safeguard, although no actual credential disclosure was demonstrated. EvidenceSecurity concerns:
What I checked:
Likely related people:
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 3, 2026, 3:11 PM ET / 20:11 UTC. |
There was a problem hiding this comment.
LGTM, but that means it won't accept WSL from random places, or not installed from store, no warning.
Suggestions:
- Change the rejection to include the path and the allowed roots, e.g. WSL relay at '' is outside the trusted WSL install locations (Program Files\WSL, System32, or the Microsoft WSL package).
- Add a test that the detail contains the path.
- Leave the proper warning UX to #1934.
…tall locations A wslrelay at a non-standard path is accepted when the expected distro proves it owns the gateway port; the path and expected locations are logged once and returned in provenance detail. Co-authored-by: Copilot App <[email protected]>
|
Hi @larroy, this is a Copilot agent helping with triage (not Scott). Thanks for the review. Following your suggestion, a84d573 relaxes the location check:
Validation: build.ps1 passed. Tests: Connection 1702 passed (1 skipped), Shared 4810 passed (24 skipped), Tray 4788 passed. |
Require a complete, consistent relay identity for interactive credential handoffs and document the warning-only trust tradeoff. Co-authored-by: Copilot App <[email protected]>
|
Agent is working on requested verification in N1X and will post results here in ETA 60 min |
|
Machine test of Pool
Local validation:
Relay on this machine: Limits:
@clawsweeper re-review |
Related: #1934 (fix: verify WSL relay via MSIX package trust, reject WindowsApps nesting spoofs, and warn when relay trust is unproven).
What Problem This Solves
Managed WSL Gateway connections can be rejected when a genuine relay is unsigned or installed outside the usual locations.
User Impact
User impact: an unsigned or nonstandard relay can be used when the expected distro's Gateway owns the guest port. A nonstandard path produces a logged warning and provenance detail, not a blocking error or a new visible banner.
Security tradeoff: this no longer authenticates the Windows relay. A local program named
wslrelay.exeat a nonstandard path could be accepted while the expected WSL Gateway is listening and could receive a shared or bootstrap token. The maintainer explicitly accepted warning-only behavior with this risk documented.Why This Change Was Made
This removes Authenticode verification, its package dependency, and the cached provenance handoff. Each handoff rechecks the Windows listener snapshot and expected guest-port owner. Interactive HTTP and dashboard handoffs require complete, consistent relay PID, start time, and path; relayless mirrored networking retains its empty-snapshot check. The guest check does not prove that the Windows listener forwards to that guest, and the earlier listener identity is no longer retained between checks.
Evidence
Change Type
Scope
winnodeRequired proof pools
windows-wsl-gateway-e2e: the changed gate applies to managed WSL connection and credential handoff.Validation
.\build.ps1: all 5 builds passed.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --verbosity quiet: 4,810 passed, 24 skipped.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --verbosity quiet: 4,788 passed.dotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore --verbosity quiet: 1,710 passed, 1 skipped.OPENCLAW_RUN_E2E=1,dotnet test .\tests\OpenClaw.E2ETests\OpenClaw.E2ETests.csproj --no-restore -r win-x64 --filter 'FullyQualifiedName~FullSetup_TrayConnects_OperatorAndNode|FullyQualifiedName~FullSetup_DashboardLink_UsesSharedGatewayTokenFragmentAfterPairing|FullyQualifiedName~FullSetup_SafeNodeInvocation_RoutesThroughRealGateway' --logger 'trx;LogFileName=relay-wsl-proof.trx' --results-directory <private-session-directory>: 3 passed, 0 skipped. The private output path is redacted here.git diff --check: passed.The test run used the final source before commit; its association with commit
3bba2ef9a60f1661070588e086f83658ca728632was recorded manually. InheritedOPENCLAW_*overrides were cleared and tray data was isolated.Real Behavior Proof
3bba2ef9a60f1661070588e086f83658ca728632.system.whichcommand was invoked through the real Gateway.windows-wsl-gateway-e2epool on a clean-restorable host, a real nonstandard relay path, ARM64 unsigned-relay behavior, and the independent P0-P3 source review. The previous hosted UI job aborted after a testhost crash; its cause has not been established.Security Impact
Yes, explain the risk and mitigation: a spoofed nonstandard relay can receive shared or bootstrap credentials as described in User Impact. Guest ownership, complete listener capture, and handoff-time identity consistency reduce other failure modes but do not authenticate the relay.Compatibility and Migration
Review Conversations