AI Agent Hub
Back to plugins
🧩

dsh-safeguard

admin-security Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install ZhijiangTang/dsh-safeguard

Paste the following prompt into your AI chat to install this plugin:

Install the plugin by running dsh plugin install ZhijiangTang/dsh-safeguard in DeepSeek Harness; the source repository is available at https://github.com/ZhijiangTang/dsh-safeguard .

About this plugin

In DeepSeek Harness, the model invokes real tools like bash, curl, and SQL. A single misfired rm -rf /, git push --force, or an AKIA key leaking into tool arguments can cause irreversible damage. dsh-safeguard hooks into the tools/pre-execute waterfall and short-circuits the call before execution, so the intercepted side-effect never happens.

It covers two risk categories out of the box: fifteen dangerous-command rules (rm -rf, force push, mkfs, dd, curl|sh pipes, SQL DROP/DELETE/TRUNCATE, and more) and six secret-leakage patterns (AWS AKIA, sk-, GitHub PAT, PEM private keys, Slack tokens). Rules are fully configurable via extraPatterns, allowList exemptions, and enableDanger / enableSecrets toggles, and two helper tools (guard_list, guard_check) let the model perform programmatic self-checks at runtime.

To be clear, this is a regex-based heuristic guard: it does not verify signatures, validate key authenticity, or provide process or filesystem sandboxing. It is best suited for admins who run DSH in production pipelines and want a low-cost interception layer for model tool calls, to be used alongside dedicated secret scanners and OS-level sandboxes rather than as a replacement for them.

Use Cases

  • Block accidental rm -rf / or force push when an agent invokes bash in CI pipelines
  • Prevent a model from writing AWS or GitHub secrets into tool arguments during multi-turn sessions
  • Run guard_check locally to verify newly added regex rules match as intended

Best For

  • Admins running DSH in production pipelines
  • DevOps engineers adding a low-cost safety layer to agent tool calls
  • Plugin developers extending interception rules in DSH