Commit ee806d8
fix(security): deny admin access on IM channels without admins config
Previously, when admins[channel] was not configured for an IM channel
(wechat, telegram, etc.), isAdminChatter returned true for ALL chatters,
allowing any anonymous user to modify SOUL.md, IDENTITY.md and other
identity files via write_file/edit_file tools.
Now falls back to ownership check (chatter UserID == agent ownerUserID)
instead of granting blanket admin. Operators can still explicitly grant
admin to specific platform IDs via admins[channel] in agent.json.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 9d673c1 commit ee806d8
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
| |||
0 commit comments