OpenCode security plugin with:
You can review the full rule sets there and add or remove patterns to fit your workspace.
Use it when you want stronger workspace safety out of the box: it helps prevent secret exposure, exfiltration, unsafe shell execution, reverse shells, denial-of-service commands, cross-workspace access, and common instruction-override attacks. Matching events are logged to .opencode/opencode-policy.log for review.
opencode plugin opencode-policy@latest --globalInstall the package:
npm install opencode-policyThen add it to one of these OpenCode config files:
~/.config/opencode/opencode.jsonfor your useropencode.jsonin your project root for one project
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-policy"]
}Pattern research and source material were adapted in part from vakovalskii/topsha

