StyxNether/dsh-auto-approval-plugin ↗★ 3

dsh-auto-approval-plugin

自动审批指定信任区域内的安全命令 适合希望在工作区外自动执行安全指令以简化审批流程的用户。

包名
dsh-auto-approval-plugin
兼容性
待验证
Harness 依赖范围
^0.1.0-rc.6 || ^0.1.1-rc.2 || ^0.1.2-rc.1
Cordis 依赖范围
^4.0.1
版本
2.1.2
许可证
MIT
最近更新
2026年9月6日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:StyxNether/dsh-auto-approval-plugin

Every configuration option, and what changing it does

OptionDefaultWhat it doesEffect of changing it
modegatedMaster switch + scopeoff: disables auto-approval entirely (the Auto Approval tier then behaves exactly like Workspace Write); global: auto-approve under any session tier; gated: auto-approve only while the session tier is auto-approval
trustedAreas[]Trusted areas (absolute paths)Empty: the plugin is left with only the harmless-introspection capability. Adding directories grants in-area git read commands, in-area simple commands, and in-area fs writes (see "Trusted area vs outside" below)
harmlessPatternsread-only introspection set (see lib/decide.js)Regexes that classify a command as "harmless"; a match (without shell metacharacters) auto-approvesAdding entries auto-approves more commands; removing restores human confirmation. Add only read-only, side-effect-free commands (the read surface should not exceed the DSH read tool)
dangerousPatternshigh-impact set (system wipes, privilege escalation, ACL, firewall, registry, persistence…)A match defers to the human — never auto-approved, never deniedMore entries send more high-impact operations to the human; fewer entries widen the auto window (not recommended). The principle is "rather wider than miss": a false positive costs one extra confirmation, a false negative could auto-approve a destructive command
maxCommandChars4000Length cap for commands/targets; longer inputs deferSmaller: longer commands always ask; larger: longer commands may participate in auto-decision (mind the widening)
logDecisionstrueWhether each auto-approval is written to the process log (auto-approval: granted … (rule))false quiets the log but drops rule-level audit lines (the approval/decided audit pair in the session log is still written)
trustedHosts[]Non-loopback hosts allowed to reach the plugin's config HTTP APIUnset: loopback only. Adding entries allows remote management from those hosts (cross-site requests are still rejected)

All of the above apply immediately: settings.yaml is hot-reloaded and the web card saves take effect without a restart.