dsh-read-guard: Intercepting Prompt Injection Before Tool Results Enter the Model
dsh-read-guard is a DSH admin-security plugin maintained by zhengqiuyang. It hooks into the tools/post-execute pipeline and utilizes the repo-inject-guard rule engine to scan tool results—such as file reads, searches, and web scraping—before they enter the model context. It supports observe, wrap, and block modes, with the default "wrap" mode performing taint isolation on high-threat content. The installation command is `dsh plugin --profile default add dsh-read-guard`. It can be configured via `cordis.patch.yml` to adjust `readTools`, `fetchTools`, and `maxScanChars`. This plugin is suitable for mitigating the risk of repository poisoning and web injection entering sessions via READ interfaces. Note that the plugin runs with the permissions of the dsh process; please review the source code and the MIT license before installation.
Read More