dsh-whitelist-auto-approval

按命令生效的 bash 沙箱白名单:一条规则指定一个命令和它可用的可写根,命中的 lark-cli、gh 等在保留工作区的前提下于内核沙箱内直接执行。与「替你回答授权弹窗」或「对所有命令统一放宽可写范围」的做法不同,这里放行的只有命中的那条命令,工作区仍可写,其他命令行为完全不变。匹配依据是命令的「写足迹」而不是命令字符串,因此 `2>&1 | tail -N` 这类不写文件的管道仍能命中;规则可在设置页或插件行里编辑。macOS 用 Seatbelt、Linux 用 bubblewrap / Landlock,Windows 则退回把可写根换成 $HOME 的旧行为。

插件介绍

按命令生效的 bash 沙箱白名单:一条规则指定一个命令和它可用的可写根,命中的 lark-cli、gh 等在保留工作区的前提下于内核沙箱内直接执行。与「替你回答授权弹窗」或「对所有命令统一放宽可写范围」的做法不同,这里放行的只有命中的那条命令,工作区仍可写,其他命令行为完全不变。匹配依据是命令的「写足迹」而不是命令字符串,因此 `2>&1 | tail -N` 这类不写文件的管道仍能命中;规则可在设置页或插件行里编辑。macOS 用 Seatbelt、Linux 用 bubblewrap / Landlock,Windows 则退回把可写根换成 $HOME 的旧行为。

安装方式

通过 npm 安装

dsh plugin --profile web add dsh-whitelist-auto-approval

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

从 GitHub 安装

dsh plugin --profile web add github:laoer/dsh-whitelist-auto-approval

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

版本兼容情况

兼容性待确认。可前往项目文档查看支持版本。

安装提示

  • 可能调用终端命令