fix(auto-reply): remove ctx.To from elevated authorization token set#11026
Closed
coygeek wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix(auto-reply): remove ctx.To from elevated authorization token set#11026coygeek wants to merge 1 commit intoopenclaw:mainfrom
coygeek wants to merge 1 commit intoopenclaw:mainfrom
Conversation
This was referenced Feb 7, 2026
Contributor
|
Heads up: the lint failure ( git fetch origin main && git rebase origin/main && git push --force-with-lease |
Contributor
|
Update: the lint failure has been resolved by #11093 (merged), which excluded git fetch origin main && git rebase origin/main && git push --force-with-lease |
Closed
13 tasks
bfc1ccb to
f92900f
Compare
Contributor
Remove recipient identity (ctx.To) from the elevated allowlist check. In WhatsApp inbound DM flows, To is set to the bot's own number for every message, allowing any command-capable sender to bypass the elevated allowlist when the owner's number is in allowFrom. Only sender-authenticated identities (SenderName, SenderUsername, SenderTag, SenderE164, From) should be used for authorization. Recipient fields are routing metadata, not authorization principals. Co-Authored-By: Claude Opus 4.6 <[email protected]>
4113bac to
054487f
Compare
Contributor
Author
|
Closing. Developer said about my issue:
|
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
Remove recipient identity (
ctx.To) from the elevated allowlist check. In WhatsApp inbound DM flows,Tois set to the bot's own number for every message, allowing any command-capable sender to bypass the elevated allowlist when the owner's number is inallowFrom.Only sender-authenticated identities (
SenderName,SenderUsername,SenderTag,SenderE164,From) should be used for authorization. Recipient fields are routing metadata, not authorization principals.Issue Linkage
Fixes #11022
Security Snapshot
Implementation Details
Files Changed
src/auto-reply/reply/reply-elevated.ts(+0/-2)Technical Analysis
Remove recipient identity (
ctx.To) from the elevated allowlist check. In WhatsApp inbound DM flows,Tois set to the bot's own number for every message, allowing any command-capable sender to bypass the elevated allowlist when the owner's number is inallowFrom.Validation Evidence
pnpm buildRisk and Compatibility
non-breaking; compatibility impact was not explicitly documented in the original PR body.
AI-Assisted Disclosure
Greptile Overview
Greptile Summary
From,Sender*) and no longer treatctx.Toas an authorization principal.Tois always the bot’s own number, letting any command-capable sender pass elevated checks when the owner is listed inallowFrom.src/auto-reply/reply/reply-elevated.tsand affects the token set used byisApprovedElevatedSender, leaving gating structure (enabled+allowFrom) intact.Confidence Score: 5/5
ctx.Tofrom the elevated allowlist token set, which is a clear security-hardening fix and is narrowly scoped (2 lines removed) without altering control flow or config semantics. Review of the full file shows no remaining reliance onctx.Tofor authorization decisions in this module.Context used:
dashboard- CLAUDE.md (source)dashboard- AGENTS.md (source)