Skip to content

security: canUseTool 增加工具级策略 #18

Description

@lishuceo

背景

当前 canUseTool 回调无条件返回 { behavior: 'allow' },所有工具调用(包括 Bash)被自动批准。Claude 自主生成的危险命令不会被 containsDangerousCommand 拦截(该检查仅在入口处对用户输入执行一次)。

需求

  • canUseTool 中至少对 Bash 工具的 command 参数执行 containsDangerousCommand 检查
  • 或维护工具白名单/分类策略

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions