fix(config): redact Feishu encryptKey in config snapshots#53414
Merged
fabianwilliams merged 1 commit intoopenclaw:mainfrom Mar 26, 2026
Merged
Conversation
… fix Generated by staged fix workflow.
Contributor
Greptile SummaryThis PR closes a security gap where the Feishu
Confidence Score: 5/5
Reviews (1): Last reviewed commit: "fix(cr-mbx-feishu-encryptkey-config-reda..." | Re-trigger Greptile |
fabianwilliams
approved these changes
Mar 26, 2026
Contributor
fabianwilliams
left a comment
There was a problem hiding this comment.
Clean companion to #53418 — covers the Feishu encryptKey gap.
What I like:
- Added
encrypt.?keytoSENSITIVE_PATTERNS— catches encryptKey, encrypt_key, and similar variants across all config paths buildSecretInputSchemanow registers with thesensitivemarker, so any plugin using it gets automatic redaction- New test confirms
channels.feishu.encryptKeyAND nested account variants (channels.feishu.accounts.default.encryptKey) are caught - The
buildSecretInputSchematest proves the registry-based approach works for arbitrary nested schemas
Small, focused, well-tested. LGTM — approve.
pxnt
pushed a commit
to pxnt/openclaw
that referenced
this pull request
Mar 27, 2026
… fix (openclaw#53414) Generated by staged fix workflow.
godlin-gh
pushed a commit
to YouMindInc/openclaw
that referenced
this pull request
Mar 27, 2026
… fix (openclaw#53414) Generated by staged fix workflow.
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.
Fix Summary
When Feishu is configured in webhook mode,
channels.feishu.encryptKeysurvives config redaction and is returned in plaintext to anyoperator.readclient viaconfig.get. The leaked key is the sole authenticator for inbound Feishu webhooks, enabling an attacker to forge accepted webhook events that OpenClaw processes as legitimate Feishu messages.Issue Linkage
Fixes #53412
Security Snapshot
Implementation Details
Files Changed
src/config/redact-snapshot.test.ts(+5/-1)src/config/schema.hints.test.ts(+18/-0)src/config/schema.hints.ts(+1/-0)src/plugin-sdk/secret-input-schema.ts(+17/-10)Technical Analysis
connectionMode: "webhook"and a plaintextchannels.feishu.encryptKeyvalue.operator.readscope.config.get. Observe that the response payload atconfig.channels.feishu.encryptKeycontains the raw key value rather than__OPENCLAW_REDACTED__.sha256(timestamp + nonce + encryptKey + JSON.stringify(payload))and send a forged webhook to the Feishu path (default/feishu/events) with correctx-lark-request-timestamp,x-lark-request-nonce, andx-lark-signatureheaders.isFeishuWebhookSignatureValid()and is dispatched viaeventDispatcher.invoke(..., { needCheck: false }).im.message.receive_v1handler.Validation Evidence
pnpm exec oxlint src/ && pnpm build && pnpm check && pnpm testRisk and Compatibility
non-breaking; no known regression impact
AI-Assisted Disclosure