Skip to content

opencode-injection-guard@0.2.0

Choose a tag to compare

@remorses remorses released this 31 Mar 10:31
· 5 commits to main since this release
  1. scanPatterns is now required — no implicit scanning — default changed from ["bash:*", "webfetch:*", "task:*"] to []. The guard does nothing unless you explicitly set which tools to scan:

    echo '{"scanPatterns":["bash:*","webfetch:*"]}' > .opencode/injection-guard.json

    Or via env var:

    OPENCODE_INJECTION_GUARD='{"scanPatterns":["bash:*","webfetch:*"]}' opencode
  2. Env var now takes highest priority — when both a config file and OPENCODE_INJECTION_GUARD env var are set, the env var wins for any field it specifies:

    OPENCODE_INJECTION_GUARD env var   (highest priority)
      |
    .opencode/injection-guard.json    (file, find-up)
      |
    hardcoded defaults                 (lowest priority)
    
  3. Per-session scan patterns for Kimaki — when running inside Kimaki (KIMAKI=1), scan patterns can be overridden per-session via a temp file at /tmp/kimaki-injection-guard/<sessionId>.json. Lets Kimaki enable/disable scanning per session without affecting other sessions or standalone OpenCode usage.