dsh-prompt-shield: Perform indirect prompt injection detection before DSH tool results enter model context
dsh-prompt-shield is an MIT-licensed DSH plugin used to detect indirect prompt injection in tool-returned text after tool execution but before results enter the model context. The plugin employs a deterministic rule engine and does not rely on additional model calls or network services, aiming to reduce the risk of high-confidence injection commands being executed. Its detection scope covers instruction override, stealing or exfiltrating secret information, leaking hidden prompts, forging authority markers, Unicode obfuscation, multi-block split instructions, and suspicious content encoded with a single layer of Base64. It supports high-confidence rules for both Chinese and English. Upon triggering, it exposes only the rule ID, score, and fingerprint, without leaking the original text. The plugin provides three working modes: observe (logging only), warn (adding a warning, default mode), and block (isolating and replacing results, recommended for actual protection). Configuration items include...
Read More