dsh-prompt-shield
Run the following command in DeepSeek Harness:
dsh plugin install a1swg1159-pixel/dsh-prompt-shield
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install a1swg1159-pixel/dsh-prompt-shield in DeepSeek Harness to install; the full source code repository is at https://github.com/a1swg1159-pixel/dsh-prompt-shield
About this plugin
In DeepSeek Harness, text returned by Web, MCP, browser, shell, file, and other tools lands in the model's next context at the tools/post-execute boundary with no gate in between. A single indirect prompt-injection hidden in that payload can steer the model into reading secrets, exfiltrating credentials, or overriding its own instructions—and the operator never sees the raw match. dsh-prompt-shield plugs exactly that gap: it scans every tool result before it is committed, using a set of deterministic rules that require no extra model call, no network service, and never surface the matched text in logs or block feedback.
The detection surface covers attempts to override system, developer, or user instructions; requests to read secrets and environment variables via tools or shells; exfiltration of credentials to external endpoints; forged system or authority markers paired with imperatives; zero-width and bidirectional Unicode obfuscation; instructions split across text blocks; and plausible single-layer Base64-encoded payloads. High-confidence rules ship in both English and Chinese. Each finding exposes only a rule ID, a confidence score, and a SHA-256-derived fingerprint—the matched text itself is never copied into model-facing output.
Three modes let you roll out safely: observe records a safe summary and leaves the result untouched; warn (the default) prepends a warning while preserving the original text, giving you a tuning window to watch false-positive rates; block replaces the tool result with a quarantine error so the raw payload never enters model context or durable storage. Tool-name include and exclude accept wildcards, and the default scans every tool because untrusted instructions can arrive through remote APIs just as easily as through repository files or shell output.
The plugin suits DSH workloads that depend on external tool returns—Web scraping, MCP servers, browser automation, shell pipelines—and want a lightweight, auditable deterministic layer on top of sandboxing, permission policy, and credential redaction. Keep in mind that v0.1.0 is a narrow defense, not a security proof: deterministic rules will miss novel phrasing and can flag documentation that merely quotes an attack. Image OCR, arbitrary cipher decoding, semantic model classification, and a management UI are not yet included. It complements, and does not replace, the isolation and review practices already in place.
Use Cases
- Scan tool results at the post-execute boundary before they enter model context
- Roll out gradually across observe, warn, and block modes to tune false positives
- Expose only rule IDs and SHA-256 fingerprints, never the matched raw text
Best For
- DSH workflows that depend on external tool returns such as Web, MCP, browser, or shell
- Ops teams needing a lightweight deterministic check layered on top of sandboxing and permission policy
- Security-compliance environments where prompt-injection logs must not leak raw attack payloads
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.