โ† XR

<div align="center">

๐Ÿ›ก๏ธ OpenClaw โ†’ XR Migration Guide

Switch to a self-hosted agent that closes the attack surface OpenClaw left open.

*BYOK ยท local-first ยท spend-capped ยท tamper-evident ยท by rrrtx*

</div>


Why you're here

OpenClaw is brilliant and moves fast โ€” but its growth came with a documented security crisis:

The standard hardening advice โ€” *"bind the gateway to 127.0.0.1, never 0.0.0.0; add egress control; encrypt credentials; vet every skill; gate risky actions"* โ€” describes exactly how XR works by default. XR is the architecture you'd have to bolt onto OpenClaw, shipped from line one.

This is not an anti-OpenClaw piece. If your OpenClaw is patched and properly bound, it's usable. This guide is for people who want those guarantees to be *the default*, not a 2โ€“4 hour hardening checklist they have to maintain forever.


The core difference

OpenClaw (default)XR (default)
Gateway bindingPublic-capable; 63% exposed in the wild127.0.0.1 only, token-authed, opt-in (xr serve)
Permission model"allow-all"Least-privilege per mode + explicit approval gates
Network egressOpenEgress allow-list โ€” can't reach a domain you didn't approve
Risky actionsOften auto-runApproval gate (CLI / phone button / voice-confirm), fail-closed
Credentials.env plaintext by defaultBYOK in OS keychain; redacted from logs
Skill supply chainOpen marketplace (malicious skills found)Signed, local markdown skills; no remote marketplace install
Auditโ€”Tamper-evident SHA-256 hash-chained log (xr verify-log)
Cost controlMetered, no hard capHard spend ceiling enforced in code
Self-improvementCan drift / regressNon-regressive skills โ€” verified wins are frozen, updates auto-rollback on regression
Prove it's safeโ€”xr test --attacks publishes a reproducible injection block-rate

CVE-by-CVE: what bit OpenClaw, and why XR's design prevents the class

XR makes no "unhackable" claim โ€” prompt injection is unsolved industry-wide. The point below is *architectural blast-radius reduction*: XR removes the default conditions that let these become criticals.
OpenClaw CVEClassHow XR's architecture prevents the class
CVE-2026-25253 (8.8, 1-click RCE via exposed gateway / token exfil)Exposed gatewayXR's daemon binds 127.0.0.1 only, is token-authed, and is opt-in. There is no public gateway to pivot through.
CVE-2026-32922 / 32025 (9.9 / auth) (token-scope / WebSocket origin bypass)Auth/scope bypassNo internet-facing control plane by default; local token; no remote owner context.
CVE-2026-26322 / GHSA-56f2 / 43526 (SSRF โ†’ internal network / metadata)SSRF / exfilEgress allow-list blocks any host you didn't approve โ€” incl. 169.254.169.254. An SSRF that can't leave the allow-list can't reach cloud metadata.
CVE-2026-24763 / 25157 / 28363 / 22179 / 32056 (command injection / allowlist bypass / RCE)Shell execshell is approval-gated *and* dangerous patterns (rm -rf, curl โ€ฆbash, etc.) are blocked before approval is even asked. Ask/Plan modes have no shell at all.
CVE-2026-27183 (shell approval bypass)Approval bypassApproval is deterministic code in the loop, not a model decision; fail-closed on timeout.
CVE-2026-26329 / 32846 / 43533 (path traversal / arbitrary file read)Path escapeEvery file tool rejects paths that escape the working directory (.., absolute paths).
CVE-2026-44114 (workspace dotenv overrides runtime env)Secret/env tamperingSecrets come from your environment / keychain, not workspace files; config is schema-validated.
CVE-2026-45004 (arbitrary code via setup-api.js from cwd)Untrusted code loadXR loads no executable code from the workspace; skills are inert markdown SOPs, not Node modules.
824โ€“1,184 malicious ClawHub skillsSupply chainXR has no remote skill marketplace. Skills are local, signed markdown; learned skills are frozen + non-regressive.
Prompt injection (e.g. CVE-2026-30741)InjectionUntrusted content is scanned, dangerous *actions* are policy-blocked regardless of model output, and egress is allow-listed โ€” so a successful injection has a tiny blast radius. Run xr test --attacks to see the block-rate.
*(Sources: jgamblin/OpenClawCVEs, cyberdesserts, sangfor, skywork, blink โ€” Febโ€“May 2026.)*

Migrate in ~10 minutes

1. Install

``bash git clone https://github.com/ahmadrrrtx/xr cd xr && bun install bun test # 124 tests should pass `

2. Point it at your model (BYOK โ€” you keep your keys)

`bash

local & free (recommended): just have Ollama running

bun run src/index.ts doctor

or bring a cloud key

export GROQ_API_KEY=... # never stored by XR; read from your env
`

3. Set your guardrails (these are XR's defaults, but make them yours)

~/.xr/config.json: `json { "budget": { "perTaskUsd": 0.25, "perTaskTokens": 250000 }, "security": { "egressAllowlist": ["api.github.com", "registry.npmjs.org"], "requireApproval": ["write_file", "delete", "shell", "send"] } } `

4. Run a task โ€” safely

`bash

dry-run first: see every change, write nothing

bun run src/index.ts --dry-run "summarize and improve the README"

real run, capped at 10 cents

bun run src/index.ts --budget 0.10 "summarize and improve the README"
`

5. Prove it's safe (the part OpenClaw can't do)

`bash bun run src/index.ts test --attacks # block-rate report bun run src/index.ts verify-log # audit chain intact? bun run src/index.ts export # signed report you can share `

6. Map your OpenClaw workflow

OpenClaw thingXR equivalent
Telegram controlxr telegram โ€” same convenience, but user-id allow-list + โœ…/โŒ approval buttons
Skills (ClawHub)xr skills โ€” 11 built-in signed skills; write your own as markdown SOPs
Cron jobsxr cron "every monday 9am: run security audit"
Always-on / gatewayxr serve โ€” dashboard on 127.0.0.1 only
MCP toolsxr mcp โ€” consumed with approval + egress + audit wrappers
Voicexr voice โ€” local Whisper/Kokoro, voice-confirm for risky actions

What you keep, what you gain, what you give up

Keep: autonomy, Telegram, cron, skills, MCP, voice, local-first, $0 to run. Gain: spend ceiling you can't blow, egress allow-list, approval gates, tamper-evident audit, non-regressive skills, a runnable injection benchmark. Give up: a giant open skill marketplace (by design โ€” that's the part that got compromised) and a public gateway (also by design).


Honest limitations


<div align="center">

If OpenClaw made your security team nervous, XR is the migration.

git clone ยท bun test ยท xr test --attacks` โ€” then decide.

*by @ahmadrrrtx*

</div>