Repository navigation
v1.3.0
Initial Release
opencode-damage-control — a security plugin for OpenCode that blocks dangerous commands and protects sensitive files.
Features
- Two-hook architecture —
tool.execute.beforeblocks/flags commands,permission.askforces confirmation dialogs via OpenCode's permission system - 85 command patterns (42 block, 43 ask) covering destructive shell commands, SQL data loss, Git history destruction, cloud infrastructure deletion, platform teardown, and piped code execution
- 33 protected file paths — zero-access for secrets (
.env*, SSH keys, cloud credentials, TLS certs, Terraform state) and read-only for system files (/etc,/boot, shell configs) - Configurable via JSON — project-level (
.opencode/damage-control.json) and global (~/.config/opencode/damage-control.json) configs with merge semantics (defaults → remove → override → add) - CI/CD — GitHub Actions for test/build on PR, tag-based releases with npm OIDC trusted publishing