Skip to content

opencode-cordon 0.1.0

Choose a tag to compare

@wangyuchen5110 wangyuchen5110 released this 03 Nov 04:00
· 9 commits to main since this release

First public release: a declarative permission cordon with an audit trail for OpenCode 2.

Highlights

  • JSONC policy with relaxed / balanced / strict presets; glob matching on action, tool, path, command and agent.
  • permission.evaluate hook that only tightens: deny always wins, ask upgrades an allow, allow/no-match never touches the native decision.
  • Append-only JSONL audit log (secrets redacted, commands hashed) plus a self-contained HTML report.
  • CLI: check / evaluate / audit / init / redact. Zero runtime dependencies, Node >= 20.
  • 57 tests, including a plugin adapter suite that drives the real @opencode/plugin hooks.

Verified

Live regression on OpenCode 2.2.5 with --auto: .env read tightened ask -> deny, rm -rf ./scratch tightened allow -> deny, both recorded in the audit log, target file survived. See docs/REGRESSION.md.

Install

opencode plugin add opencode-cordon npx opencode-cordon init

Requires OpenCode 2.2.x. Not a sandbox; not an LLM reviewer; not a V1 compatibility layer.