Skip to content

security: add config toggle for permission.ask read auto-allow in Feishu sessions #69

Description

@coderabbitai

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions