a1swg1159-pixel/dsh-prompt-shield
a1swg1159-pixel★ 1TypeScriptLast synced: 2026-08-15
Runtime prompt-injection detection and quarantine for DeepSeek Harness tool results.
README excerpt
dsh-prompt-shield English 简体中文 Runtime indirect prompt-injection detection for DeepSeek Harness. The plugin scans text returned by Web, MCP, browser, shell, file, and other tools at DSH's tools/post-execute boundary, before that result is committed as the model's next context. This first version is deliberately deterministic: no extra model call, no network service, and no raw suspicious text in its logs or block feedback. What it detects - attempts to override system, developer, or user instructions; - requests to use tools or shells to read secrets and environment variables; - requests to transmit secrets to an external endpoint; - requests to reveal hidden prompts; - forged system/authority markers paired with imperatives; - zero-width and bidirectional Unicode obfuscation; - suspicious instructions split across text blocks; - plausible Base64-encoded instructions (one decoding layer). English and Chinese high-confidence rules are included. Findings expose only a rule ID, score, and SHA-256-derived fingerprint—not the matched text. Modes - observe : log a safe finding and leave the result unchanged. - warn (default): prepend a warning but preserve the original result. This is a …
View full README on GitHub →