Background
In src/index.ts, the permission.ask hook currently auto-approves read permission for all Feishu sessions unconditionally (output.status = "allow"). This was noted as a security concern in PR #68 (comment: #68 (comment)).
The behavior predates the typed error taxonomy feature (PR #68) and was deferred as out of scope for that PR.
Problem
Remote Feishu messages (especially in group chat) could potentially induce the agent to read sensitive local files without explicit user confirmation, since read permission is silently granted to all Feishu-session-originated requests.
Proposed Solution
Add an explicit, auditable configuration toggle in FeishuConfigSchema (e.g. autoAllowRead?: boolean, defaulting to false) so that operators must opt in to the auto-allow behavior. When the toggle is absent or false, revert to the default ask behavior so the user is prompted.
Suggested change in permission.ask handler:
- Only set
output.status = "allow" when resolvedConfig.autoAllowRead === true.
- Log appropriately in both the allow and ask paths.
References
Background
In
src/index.ts, thepermission.askhook currently auto-approvesreadpermission for all Feishu sessions unconditionally (output.status = "allow"). This was noted as a security concern in PR #68 (comment: #68 (comment)).The behavior predates the typed error taxonomy feature (PR #68) and was deferred as out of scope for that PR.
Problem
Remote Feishu messages (especially in group chat) could potentially induce the agent to read sensitive local files without explicit user confirmation, since
readpermission is silently granted to all Feishu-session-originated requests.Proposed Solution
Add an explicit, auditable configuration toggle in
FeishuConfigSchema(e.g.autoAllowRead?: boolean, defaulting tofalse) so that operators must opt in to the auto-allow behavior. When the toggle is absent orfalse, revert to the defaultaskbehavior so the user is prompted.Suggested change in
permission.askhandler:output.status = "allow"whenresolvedConfig.autoAllowRead === true.References