opencode-policy
v0.1.4
Published
OpenCode plugin for blocked file patterns and prompt injection policies
Maintainers
Readme
opencode-policy
OpenCode security plugin with:
You can review the full rule sets there and add or remove patterns to fit your workspace.
Unsafe tool patterns
Prompt injection patterns
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.
Install from npm
Install 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"]
}License
Thanks
Pattern research and source material were adapted in part from vakovalskii/topsha
