fix(imessage): require authorization for group actions#97961
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 29, 2026, 8:39 PM ET / 00:39 UTC. Summary PR surface: Source +28, Tests +104. Total +132 across 2 files. Reproducibility: yes. from source inspection: current main reaches the native iMessage group mutation branches without an owner/admin authorization check, and Gateway write-only callers are forced to senderIsOwner=false. I did not run a live mutation because this cleanup review is read-only and the contributor supplied exact-head Gateway/log proof for the fix. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Merge the plugin-owned authorization gate after a maintainer accepts the fail-closed operator.write impact; no automated repair is needed. Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: current main reaches the native iMessage group mutation branches without an owner/admin authorization check, and Gateway write-only callers are forced to senderIsOwner=false. I did not run a live mutation because this cleanup review is read-only and the contributor supplied exact-head Gateway/log proof for the fix. Is this the best way to solve the issue? Yes, this is the best fix shape: iMessage owns these native mutations, while the shared dispatcher and Gateway already carry trusted sender and scope facts. A core hardcoded iMessage policy would be the wrong boundary; the remaining question is maintainer acceptance of the compatibility impact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 455f813d6ee6. Label changesLabel justifications:
Evidence reviewedPR surface: Source +28, Tests +104. Total +132 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Behavioral proof on exact head Environment: Linux x86_64, Node Same This proves the changed behavior at the public Gateway boundary: write-only automation fails closed before runtime loading or native mutation, while the admin path still reaches the expected native group-management command. Focused regression validation was rerun after the behavioral scenario: The compatibility impact is intentional and is now explicit in the PR body: existing callers using only |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
(cherry picked from commit 587eefe)
(cherry picked from commit 587eefe)
(cherry picked from commit 587eefe)
Summary
Restricts iMessage group-management actions to owner-authorized message turns or Gateway callers with
operator.adminscope.What Problem This Solves
Fixes an issue where callers with generic message-action write access could invoke iMessage group membership and metadata mutations without owner or administrator authorization.
Changes
operator.adminscope.Why This Change Was Made
The implementation follows the existing channel-owned authorization pattern used for privileged Microsoft Teams actions. It keeps ordinary iMessage actions unchanged and enforces the authorization check before loading or invoking native mutation functions.
User Impact
Authorized owner and administrator flows continue to work. Non-owner, non-admin callers can no longer mutate iMessage group metadata or membership through the shared message-action surface.
This fail-closed change is intentional and compatibility-sensitive: existing Gateway or automation clients that invoke
renameGroup,setGroupIcon,addParticipant,removeParticipant, orleaveGroupwith onlyoperator.writewill now be rejected. Those callers must provide verified owner provenance or connect withoperator.admin.Validation
node scripts/run-vitest.mjs extensions/imessage/src/actions.test.ts— 37 passednode scripts/run-vitest.mjs src/channels/plugins/message-actions.security.test.ts— 3 passedoperator.writedenied before any bridge process;operator.adminsucceeded and emittedchat-add-membernode_modules/.bin/oxfmt --check extensions/imessage/src/actions.ts extensions/imessage/src/actions.test.tsgit diff upstream/main...HEAD --check.agents/skills/autoreview/scripts/autoreview --mode branch --base upstream/main --stream-engine-output— clean, no actionable findingsEvidence
Regression tests verify all five privileged group actions are rejected before their native runtime functions run for an
operator.writenon-owner. Separate assertions verify owner andoperator.adminrequests remain authorized.A full Gateway WebSocket proof on the exact PR head used separately paired write-only and admin clients against the same
message.actionpayload. The write-only response was rejected with the new authorization error and the bridge log did not exist, proving no subprocess ran. The admin response succeeded and the bridge log recorded the expectedstatus --jsonprobe followed bychat-add-member --chat <redacted> --address <redacted> --json. The deterministic bridge executable avoided mutating a real Messages group while exercising the production Gateway, plugin dispatch, lazy runtime load, probe, subprocess, and command construction paths.Notes
AI-assisted. No configuration, protocol, dependency, or documentation surface changes.