secret-guard
Run the following command in DeepSeek Harness:
dsh plugin install JohnXu22786/secret-guard
Paste the following prompt into your AI chat to install this plugin:
Install the plugin by running dsh plugin install JohnXu22786/secret-guard in DeepSeek Harness. Source code: https://github.com/JohnXu22786/secret-guard
About this plugin
When a DeepSeek Harness agent works through your project files, it may casually open a .env, an SSH private key, or AWS credentials, pulling raw API keys straight into the conversation context. One leak and every safeguard you put in place is undone. secret-guard exists to close that most common exposure path.
It works as a two-layer shield. The first layer intercepts before execution: before any file tool touches .env, id_rsa, .aws/credentials, or similar sensitive paths, the plugin evaluates a gitignore-style rule table and issues block, block-read, or allow decisions that short-circuit the tool body entirely. The second layer is a post-execution masking fallback: even if content slips past interception via bash, MCP tools, or any ungated tool, the plugin runs shape recognition over the returned text and replaces suspected secrets such as PEM key blocks, JWTs, Bearer tokens, known prefixes like ghp_ or AKIA, and connection strings with embedded passwords with a [redacted::] placeholder. On top of that, a family of sg_* inspection tools lets the agent verify whether a key exists, is empty, or matches a pattern, returning only key names, line numbers, and HMAC fingerprints. Every block, mask, rule reload, and error is appended to a local JSONL audit journal that rotates by size, and the rule file supports hot reload with sub-second polling.
It is built for developers and security-sensitive teams who run agents in dsh, especially when projects carry many secret files and the agent still needs to read and write code freely. It does not migrate, encrypt, or move any secret; it does one job: keeping secrets out of the model context. Pure TypeScript, zero build step, active the moment you install it.
Use Cases
- Prevent .env and private keys from leaking into agent context during automated file reads
- Apply shape-recognition masking to tool outputs that bypass the pre-execution interception layer
- Maintain auditable access logs with hot-reloadable rule policies for team governance
Best For
- Developers running agents in dsh
- Teams with scattered secret files that still require agent code access
- Security engineers needing auditable access control and policy management for sensitive files
Related Plugins
Adds an Auto approval mode on the official workspace-write sandbox, classifying semantic risks, asking when ambiguous, and denying destructive operations.
Undo/rollback system for DSH: config & plugin snapshots, one-click undo/redo/restore, message-level revert, secret masking, safe mode, and offline WebUI/GUI/CLI rescue tools for when DSH won't start.
Packages all 87 SKILL.md files from upstream reverse-skill as a DeepSeek Harness plugin that auto-registers them for authorized reverse engineering, penetration testing, and security research.
Dockyard DSH is a native DeepSeek Harness plugin that unifies official OAuth/client sessions for Codex, Antigravity, Grok, Claude, and Cursor, providing account pool, model catalog, and quota status.