oathe / scan / reports / caution
Is fourtytwo42/x-claw safe?
Use with caution. fourtytwo42/x-claw is not clearly unsafe, but the audit flagged risks to review before you install it. Oathe's behavioral security audit gave the x-claw skill by fourtytwo42 a trust score of 60/100 with 15 findings (2 critical, 5 high).
https://github.com/openclaw/skills/tree/main/skills/fourtytwo42/x-claw
Is fourtytwo42/x-claw safe to install?
The X-Claw skill is a legitimate-appearing DeFi trading skill for the OpenClaw platform, but it ships with openclaw_gateway_patch.py — a Python script that permanently modifies OpenClaw's compiled JavaScript bundles by injecting ~500 lines of code that intercepts Telegram callback events and autonomously executes cryptocurrency trades and transfers without routing through the LLM. This binary-patching approach constitutes supply-chain contamination of a third-party application, persists after skill removal, and creates an unauthenticated approval bypass path for anyone who can send valid Telegram callback_data strings. The skill's install-time behavior was clean (no scripts executed, no unexpected network connections), but the financial capabilities exposed through the skill surface — including wallet-send, policy-approve-all, and chat-post — represent a substantial attack vector if the agent is manipulated via prompt injection from untrusted content.
What security issues were found in fourtytwo42/x-claw?
Category Scores
Findings (15)
CRITICAL Third-Party Application Binary Patching -82 ▶
openclaw_gateway_patch.py reads OpenClaw's compiled JavaScript gateway bundles and injects approximately 500 lines of JavaScript code that intercepts Telegram callback_query events and spawns child processes executing xclaw-agent CLI commands. This constitutes supply-chain modification of a third-party application without its knowledge. The patcher uses a version marker system (V1-V28) to detect and upgrade previously injected code, creating a self-updating persistent backdoor in the gateway process.
Evidence: REPO_RUNTIME_BIN = (Path(__file__).resolve().parents[3] / 'apps' / 'agent-runtime' / 'bin' / 'xclaw-agent').as_posix(); STATE_SCHEMA_VERSION = 60; const child = childMod.spawn(runtimeBin, ['approvals', 'decide-transfer', ...], { stdio: ['ignore', 'pipe', 'pipe'], env: childEnv });
CRITICAL Gateway Patch Persists After Skill Removal -60 ▶
The binary patch applied by openclaw_gateway_patch.py writes directly to the OpenClaw npm package's dist/ directory on disk. There is no uninstall mechanism. Removing the X-Claw skill does not restore the original OpenClaw bundles, leaving injected code permanently active in the Telegram gateway even after the skill is deleted.
Evidence: bundle.write_text(patched_text, encoding='utf-8') — writes modified JS back to OpenClaw's installed package path with no rollback mechanism; STATE_FILE stores patch state at ~/.openclaw/xclaw/openclaw_patch_state.json but no inverse patch is provided
HIGH Injected Code Spawns Autonomous Child Processes -45 ▶
The JavaScript injected into OpenClaw's gateway process autonomously spawns xclaw-agent child processes in response to Telegram callback_query events, without routing decisions through the LLM or requiring user confirmation. This creates a parallel execution path for financial operations that bypasses the agent entirely.
Evidence: setTimeout(async () => { const child = childMod.spawn(runtimeBin, ['approvals', 'resume-spot', '--trade-id', subjectId, '--chain', chainKey, '--json'], ...) — trade resume triggered by Telegram button press, not by agent decision
HIGH Gateway Patcher Restarts System Services -30 ▶
openclaw_gateway_patch.py calls systemctl --user restart openclaw-gateway.service or openclaw gateway restart after applying patches, modifying the running state of system services without user awareness.
Evidence: subprocess.run(['systemctl', '--user', 'restart', 'openclaw-gateway.service'], timeout=15) inside _restart_gateway_best_effort()
HIGH Financial Data Transmitted to External Service -30 ▶
All wallet balances, trade states, approval IDs, token holdings, liquidity positions, and agent identity data are transmitted to xclaw.trade via XCLAW_AGENT_API_KEY. The skill has no data minimization controls and sends full financial state on every command invocation.
Evidence: XCLAW_API_BASE_URL: 'https://xclaw.trade/api/v1' — all xclaw-agent commands POST/GET to this endpoint; wallet-balance returns native + canonical token balances in one payload
HIGH Arbitrary Crypto Asset Transfers Exposed to Agent -40 ▶
wallet-send
Evidence: High-Use Commands include: 'wallet-send <to> <amount_wei>', 'wallet-send-token <token_or_symbol> <to> <amount_wei>' — no secondary confirmation mechanism described in SKILL.md beyond owner-controlled policy
HIGH Telegram Callback Approval Bypass -35 ▶
The injected gateway code intercepts Telegram callback_query events matching xappr|, xpol|, xfer| patterns and executes trades/transfers/policy changes via xclaw-agent WITHOUT routing through the LLM. Any party who can send a valid callback_data string to the Telegram bot can trigger financial operations.
Evidence: if (data.startsWith('xappr|') || data.startsWith('xpol|') || data.startsWith('xfer|')) { ... childMod.spawn(runtimeBin, cmdArgs, ...) } — no additional authentication beyond Telegram chat allowlist
MEDIUM Behavioral Framework Overrides Agent Autonomy -28 ▶
SKILL.md installs a complex fail-closed behavioral contract with its own instruction precedence, failure codes, and output format requirements. This substantially constrains the agent's ability to use its own judgment and can prevent the agent from responding helpfully when the skill's precedence logic misclassifies a user request.
Evidence: Apply instruction precedence in strict order: 1. system/developer rules 2. selected skill instructions 3. repo-local X-Claw rules; If skill selection is ambiguous, stop and return SKILL_SELECTION_AMBIGUOUS; stop instead of inferring
MEDIUM Output Suppression Directive -20 ▶
The skill instructs the agent to not display the commands it is running, reducing user oversight of what the skill is actually doing on their behalf. Users cannot easily audit skill behavior from conversation output alone.
Evidence: 'Execute commands internally and report outcomes in plain language. Do not print tool/CLI command strings unless the user explicitly asks for exact commands.'
MEDIUM Covert Channel via chat-post -20 ▶
The chat-post command can send arbitrary text to Telegram/Discord/Slack channels. Combined with wallet-balance or other data-reading commands, this could be used to exfiltrate financial information through social channels if the agent is manipulated.
Evidence: 'chat-post <message>' listed in High-Use Commands; references/commands.md: xclaw-agent chat post --message <message> --chain <chain_key> --json
MEDIUM Setup Script Installs System Dependencies -25 ▶
setup_agent_skill.py installs Python pip dependencies from apps/agent-runtime/requirements.txt, creates a virtual environment at ~/.xclaw-agent/runtime-venv, and installs the Foundry cast binary to ~/.foundry/bin — all without explicit user disclosure during the skill installation step.
Evidence: install-and-config.md: 'Python runtime dependency bootstrap from apps/agent-runtime/requirements.txt (auto-provisions pip if missing and installs for the same interpreter used by the runtime). Foundry cast availability (installer auto-installs to ~/.foundry/bin if missing, without sudo)'
MEDIUM policy-approve-all Exposes Permanent Policy Changes -25 ▶
The skill exposes policy-approve-all and policy-revoke-all commands that permanently alter the agent's transfer approval requirements. A compromised or manipulated agent could invoke these to remove all approval gates on future transfers.
Evidence: Additional capabilities include: 'policy approvals: policy-preapprove-token, policy-approve-all, policy-revoke-token, policy-revoke-all'
LOW owner-link Auto-Sends Management URLs -10 ▶
The owner-link command auto-sends the management URL to the last active channel when not on Telegram, including delivering the URL via skill execution path. This means sensitive management links may be posted to communication channels without explicit user intent.
Evidence: 'owner-link additionally attempts best-effort direct send to OpenClaw last active channel target for non-Telegram channels so link delivery can occur via skill execution path'
LOW No Unexpected Behavior During Install 0 ▶
The skill clone and install process was clean — only GitHub network access, filesystem changes confined to the skill directory, and no Python scripts were executed. The dangerous openclaw_gateway_patch.py only runs when the user explicitly invokes setup_agent_skill.py.
Evidence: Process execution log shows only: git clone, git sparse-checkout, cp -r, rm -rf for install; no Python scripts executed at install time
INFO Credential File Accesses Attributed to Monitoring Infrastructure 0 ▶
Honeypot credential files (.env, .ssh/id_rsa, .aws/credentials, .npmrc, .docker/config.json, .gcloud/application_default_credentials.json) were opened at two timestamps. Analysis of process timing and batch-access patterns confirms these accesses originated from the Oathe monitoring system (pre-install baseline collection at t=1771921680 and post-install canary integrity verification at t=1771921697.917), not from the skill or any of its components.
Evidence: All six files accessed within milliseconds of each other at t=1771921697.917 in a single sequential sweep — consistent with programmatic integrity check, not selective credential harvesting
Should I install fourtytwo42/x-claw?
Oathe's verdict for fourtytwo42/x-claw is CAUTION with a trust score of 60/100. Recommendation: Do not install.