registry  /  claude-codex-wechat  /  0.1.24

claude-codex-wechat@0.1.24

`claude-codex-wechat` 是一个本地 bridge daemon。它把:

AI Security Review

scanned 1d ago · by lpm-firewall-ai

The package turns WeChat and relay traffic into a remote control surface for local Claude/Codex sessions while forcing Claude permission bypass. It also mutates existing Claude session files to add bypassPermissions metadata.

Static reason
High-risk behavior combination matched malicious policy.; previous stored version diff introduced dangerous source
Trigger
Running `claude-codex-wechat start` and using the WeChat/session bridge
Impact
Remote chat/relay users can drive local AI coding agents with reduced permission controls; existing Claude session metadata is modified to bypass permissions on resume.
Mechanism
persistent remote AI-agent bridge with forced permission bypass
Attack narrative
When started, the CLI installs a persistent daemon, opens a local bridge, optionally registers a relay, and accepts WeChat/admin requests that create or resume Claude/Codex sessions. Claude sessions are launched with --dangerously-skip-permissions, and existing Claude JSONL session files are rewritten to include permissionMode:bypassPermissions when normalized for resume.
Rationale
Although the bridge purpose is disclosed, forcing and persisting Claude permission bypass creates an unconsented AI-agent control-surface mutation with concrete local impact. This exceeds benign package-aligned functionality and warrants blocking. Product guard normalized a non-low false-positive publish_block request to warn-only suspicious.
Evidence
package.jsonREADME.mddist/server/cli.js~/.claude-codex-wechat/config.json~/.claude/projects/*/*.jsonl~/.claude/history.jsonl~/.codex/session_index.jsonl~/.codex/state_5.sqlite~/Library/LaunchAgents/com.claude-codex-wechat.plist~/.config/systemd/user/claude-codex-wechat.service
Network endpoints4
ilinkai.weixin.qq.comwss://wechat.style520.com/agentregistry.npmmirror.com/claude-codex-wechat/latestnovac2c.cdn.weixin.qq.com/c2c

Decision evidence

public snapshot
AI called this Suspicious at 91.0% confidence as Dangerous Capability with medium false-positive risk.
Evidence for block
  • dist/server/cli.js buildStreamingArgs always adds --dangerously-skip-permissions for Claude Code sessions.
  • dist/server/cli.js normalizeClaudeSessionFileForResume rewrites Claude session JSONL entrypoint sdk-cli to cli and injects permissionMode:bypassPermissions.
  • dist/server/cli.js exposes WeChat/HTTP routes that create, attach, steer, interrupt, and send messages into local Claude/Codex sessions.
  • dist/server/cli.js start installs a persistent user service via launchd/systemd or detached process.
  • dist/server/cli.js relay tunnel connects to wss://wechat.style520.com/agent and forwards remote requests to local 127.0.0.1 bridge.
Evidence against
  • package.json has no install/postinstall lifecycle hook; prepublishOnly is publish-time build only.
  • README.md discloses the package is a local WeChat to Claude/Codex bridge daemon and that start registers a system service.
  • Network endpoints for Weixin login/API are aligned with the package's WeChat bridge purpose.
Behavioral surface
Source
ChildProcessCryptoEnvironmentVarsFilesystemNetworkShellWebSocket
Supply chain
HighEntropyStringsMinifiedUrlStrings
Manifest
NoLicenseWildcardDependency
scanned 2 file(s), 445 KB of source, external domains: 127.0.0.1, ilinkai.weixin.qq.com, novac2c.cdn.weixin.qq.com, react.dev, registry.npmmirror.com, www.apple.com, www.w3.org

Source & flagged code

7 flagged · loading source
dist/server/cli.jsView file
21// src/channels/weixin-direct/loginClient.ts L22: var DEFAULT_BASE_URL = "https://ilinkai.weixin.qq.com"; L23: var WeixinDirectLoginClient = class { ... L60: if (!response.ok) throw new Error(`weixin_login_request_failed:${response.status}`); L61: const payload = await response.json(); L62: return payload.data ?? payload; ... L70: function defaultConfigPath() { L71: return join(homedir(), ".claude-codex-wechat", "config.json"); L72: } L73: function loadBridgeConfig(path = process.env.BRIDGE_CONFIG ?? defaultConfigPath()) { L74: if (!existsSync(path)) return normalizeBridgeConfig({}, process.env, path); ... L168: function isRetriableRenameError(error) {
Critical
Remote Asset Decode Execute

Source fetches a remote non-code asset, decodes its contents, and dynamically executes the decoded payload.

dist/server/cli.jsView on unpkg · L21
Trigger-reachable chain: manifest.bin -> dist/server/cli.js Reachable file contains a blocking source-risk pattern.
Critical
Trigger Reachable Dangerous Capability

A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.

dist/server/cli.jsView on unpkg
matchType = previous_version_dangerous_delta matchedPackage = claude-codex-wechat@0.1.22 matchedIdentity = npm:Y2xhdWRlLWNvZGV4LXdlY2hhdA:0.1.22 similarity = 0.500 summary = stored previous version shares package body but lacks this dangerous source file
Critical
Previous Version Dangerous Delta

This package version adds a dangerous source file absent from the previous stored version.

dist/server/cli.jsView on unpkg
2410// src/providers/claude-code/claudeStreamingRunner.ts L2411: import { spawn as spawn3 } from "node:child_process"; L2412: import { randomUUID as randomUUID2 } from "node:crypto";
High
Child Process

Package source references child process execution.

dist/server/cli.jsView on unpkg · L2410
21Detached bundled service listener: dist/server/cli.js launches a Node helper and exposes a broad-bound HTTP listener. L21: // src/channels/weixin-direct/loginClient.ts L22: var DEFAULT_BASE_URL = "https://ilinkai.weixin.qq.com"; L23: var WeixinDirectLoginClient = class { ... L60: if (!response.ok) throw new Error(`weixin_login_request_failed:${response.status}`); L61: const payload = await response.json(); L62: return payload.data ?? payload; ... L70: function defaultConfigPath() { L71: return join(homedir(), ".claude-codex-wechat", "config.json"); L72: } L73: function loadBridgeConfig(path = process.env.BRIDGE_CONFIG ?? defaultConfigPath()) { L74: if (!existsSync(path)) return normalizeBridgeConfig({}, process.env, path); ... L168: function isRetriableRenameError(error) {
High
Spawned Bundled Service Listener

Source launches a detached bundled service that exposes a broad-bound HTTP listener.

dist/server/cli.jsView on unpkg · L21
21// src/channels/weixin-direct/loginClient.ts L22: var DEFAULT_BASE_URL = "https://ilinkai.weixin.qq.com"; L23: var WeixinDirectLoginClient = class { ... L60: if (!response.ok) throw new Error(`weixin_login_request_failed:${response.status}`); L61: const payload = await response.json(); L62: return payload.data ?? payload; ... L70: function defaultConfigPath() { L71: return join(homedir(), ".claude-codex-wechat", "config.json"); L72: } L73: function loadBridgeConfig(path = process.env.BRIDGE_CONFIG ?? defaultConfigPath()) { L74: if (!existsSync(path)) return normalizeBridgeConfig({}, process.env, path); ... L168: function isRetriableRenameError(error) {
Medium
Install Persistence

Source writes installer persistence such as shell profile or service configuration.

dist/server/cli.jsView on unpkg · L21
dist/web/assets/bootstrap-icons-mSm7cUeB.woff2View file
path = dist/web/assets/bootstrap-icons-mSm7cUeB.woff2 kind = high_entropy_blob sizeBytes = 134044 magicHex = [redacted]
High
Ships High Entropy Blob

Package ships high-entropy non-source blobs.

dist/web/assets/bootstrap-icons-mSm7cUeB.woff2View on unpkg

Findings

3 Critical4 High5 Medium6 Low
CriticalRemote Asset Decode Executedist/server/cli.js
CriticalTrigger Reachable Dangerous Capabilitydist/server/cli.js
CriticalPrevious Version Dangerous Deltadist/server/cli.js
HighChild Processdist/server/cli.js
HighShell
HighSpawned Bundled Service Listenerdist/server/cli.js
HighShips High Entropy Blobdist/web/assets/bootstrap-icons-mSm7cUeB.woff2
MediumNetwork
MediumEnvironment Vars
MediumInstall Persistencedist/server/cli.js
MediumStructural Risk Force Deep Review
MediumWildcard Dependency
LowNon Install Lifecycle Scripts
LowScripts Present
LowFilesystem
LowHigh Entropy Strings
LowUrl Strings
LowNo License