Repository navigation
Add experimental WeChat text approval - #237
Open
yikkuro (yikkuro) wants to merge 3 commits into
Open
yikkuro (yikkuro) wants to merge 3 commits into
yikkuro (yikkuro) wants to merge 3 commits into
Conversation
Replace denylist-based command rendering with an exact structured allowlist and constant-label presentation so unknown or sensitive values remain local-only. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep arbitrary free-form and structurally unknown values local-only even when they do not match known credential shapes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Validate the final English and Chinese local-only disclosure after rebasing onto the merged feature. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the experimental WeChat plain-text approval flow so approval prompts cannot disclose unknown or secret-bearing command values before approval.
Trusted-plugin provenance assumption
The product intentionally treats normalized ingress metadata from the allowlisted
openclaw-weixinplugin and Gateway as authentic user input: account/sender/direct-chat identity, upstream message ID, cursor/order, content, and quote/forward/group metadata. Independent upstream WeChat signatures or immutable lookup are out of scope. Compromise of the authenticated WeChat session, plugin, or Gateway remains an explicit documented product risk.Electron main remains the sole approval authority. The plugin cannot create challenge state, enumerate approvals, resolve through the ordinary
messagetool, mint execution/readiness proofs, or create durable approvals. Candidate replies are consumed before agent history/dispatch.Remote eligibility and exact semantics
Remote prompts are limited to exact built-in read-only Windows query tuples:
hostname.exe;whoami.exewith no arguments or exactly/user,/groups,/priv;ipconfig.exewith no arguments or exactly/all; andsysteminfo.exe. They additionally require the exact System32 path, scratch CWD, no declarations, no mutable file operand, recognized containment, and bothallow-onceanddeny. Prompts send no raw command, argv, executable path/hash, CWD, declarations, agent/session, or other free text to WeChat.1 CODE: approve the exact current request once.2 CODE: deny the exact current request.3 CODE: approve only the exact currently enumerated originating-message batch once.No option creates durable, global, folder, or future approval. Raw request/security fields remain integrity-bound and are revalidated before the existing one-use proof is issued. Local and remote approval remain first-valid-response-wins with existing identity, replay, cursor, drift, relock, Off, restart, logout/rebind, disable/revoke, timeout, and shutdown invalidation.
Regression coverage
Covers default-off owner binding and EN/ZH copy; options 1/2/3 and exact batches; pre-agent consumption and no history leakage; replay/expiry/attempt limits; exact request/security drift and lifecycle invalidation; no durable approval; exact allowlisted tuples; rejection of unknown executable/path/argv/CWD/declarations/mutable operands/modes; and positional passwords, passphrases, Azure
AccountKey/SASsig, npm tokens, Slackxoxb, custom auth headers, opaque base64/random values, unknown switches, duplicate-key JSON, decomposed Unicode, controls/bidi/zero-width values. Tests assert prompts contain constant labels but no raw authorization fields.Validation
Passed:
npm run lint:weixin --prefix desktop(0 errors; 7 pre-existing warnings)git diff --checkRepository-wide checks were also attempted and still report unrelated default-branch debt: two ESLint errors in
chat-attachments.tsandopenclaw-upgrade-recovery.ts, plus Prettier drift in 20 unchanged files. No changed file fails lint or formatting.A final independent read-only security review found no findings under the documented trusted-plugin provenance assumption.
No live WeChat account, Electron app, Gateway, or current runtime was started, restarted, or modified; no live-account E2E was performed.