Steven-Qiang/dsh-pwsh-guard ↗★ 0
dsh-pwsh-guard
拦截并拒绝终端中的 Shell 文本读写命令 适合需要限制智能体执行危险或低效 Shell 命令的场景。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Steven-Qiang/dsh-pwsh-guard說明文件
閱讀完整 README ↗Configuration
All fields are optional.
- id: pwsh-guard
name: 'dsh-pwsh-guard'
config:
enabled: true
language: auto # zh | en | auto
tools: [pwsh, bash, ops_bash]
disabledGroups: [] # textSearch | textRead | runtimeBypass | sleep | stderrMerge
allowPatterns: [] # regexes matched against the raw command; a match allows the call
rules: [] # extra rules, evaluated before the built-ins
language: auto follows DSH_LOCALE, then the host locale, then LANG / LC_ALL.
rules:
- id: no-force-push
pattern: 'git\s+push\s+--force'
title: 'Force push is blocked'
hint: 'Use --force-with-lease instead'