AI Agent Hub
Back to plugins
🧩

dsh-guard-sensitive-paths

admin-security Updated 2026.09.02

Run the following command in DeepSeek Harness:

dsh plugin install TARS-snail/dsh-guard-sensitive-paths

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

Run dsh plugin install TARS-snail/dsh-guard-sensitive-paths in your DeepSeek Harness terminal to install the plugin; the source is available at https://github.com/TARS-snail/dsh-guard-sensitive-paths and it takes effect after restarting the current profile.

About this plugin

In DeepSeek Harness automation pipelines, an AI agent executing write, edit, str_replace_editor, or bash may inadvertently touch .env, .git, SSH private keys, or .pem certificates. A single careless write can expose credentials or corrupt repository metadata. dsh-guard-sensitive-paths pushes this guardrail ahead of every tool invocation so that calls hitting sensitive paths no longer pass silently but trigger an explicit approval prompt.

At its core, the guard registers at the front of the tools/pre-execute listener chain via PREPEND, running before any permission-granting logic. Write and edit tools match the full sensitive set (.env, .git, .ssh, SSH keys, .pem); read is limited to the key material subset (SSH private keys, .pem) to avoid blocking legitimate environment-file loads; bash command text is scanned against the same set via substring matching. A hit returns an ask decision, and without an approval channel automation fails closed. Non-matching calls are delegated through next() with zero added latency.

It is well suited for teams or individual developers running DSH profiles in local or CI environments where .env, .git, and ~/.ssh files coexist with the workspace and a human-in-the-loop checkpoint around AI tool calls is desired. It activates with zero configuration by default and can be toggled off with a single sensitivePaths boolean.

Use Cases

  • CI pipelines where AI agents reference .env or SSH keys during bash runs
  • Local workspaces where .git and .ssh directories sit alongside source code
  • Multi-tool sequences (write, edit, bash) that may touch key material files

Best For

  • Teams running DSH profiles in local or CI environments
  • Developers whose workspaces hold sensitive files like .env or .ssh
  • Security and DevOps engineers adding human-in-the-loop checkpoints to AI tool calls