Skip to content

Releases

dsh-whale-guard 0.1.1

Choose a tag to compare

@WYR-233 WYR-233 released this 11 Oct 10:22
v0.1.1
8053757

dsh-whale-guard 0.1.1

把「自己杀自己」这类低级事故变成工具层面的硬拦截,零依赖、纯 JS。

三件套

  • safe_kill 工具:按模式杀进程时,自动排除自己 + 全部祖先进程链 —— 再也不用担心 pkill -f "<模式>" 匹配到自己(另附 guard_status 排障工具)
  • bash 命令预检:挂 tools/pre-execute,拦截 pkill 自匹配、ps|grep|xargs kill 自杀链、sudo -S 抢 heredoc、rm -rf /、kill 1、chmod -R 777 / 等;被拦下时给模型一份安全替代写法
  • 可扩展规则库:内置 9 条规则,severity 三档(block / warn / hint);规则文件 $DSH_HOME/whale-guard-rules.json,改完即生效不用重启

设置页

设置 → 防呆:守卫状态 / 处置方式(拦截⇄只提醒,点了即时生效)/ 受保护进程链 / 规则清单(勾选即停用)/ 最近拦截日志。

安装

dsh plugin --profile web add github:WYR-233/dsh-whale-guard

Install (EN)

Zero-dependency safety guard: a safe_kill tool that never touches itself or its ancestor chain, a bash pre-execute guard with an extensible rule library (block/warn/hint), and a settings page to tune the response or disable rules live.