{
  "schemaVersion": 1,
  "evaluation": {
    "id": "opencode-cli",
    "testedOn": "2026-10-18",
    "coverage": "local-runtime",
    "summary": "The v1.19.3 binary resolved explicit deny settings, rejected an invalid permission value and enforced a password on the tested localhost configuration endpoint. No model or agent task was run.",
    "identity": {
      "version": "1.19.3",
      "target": "https://github.com/anomalyco/opencode/releases/download/v1.19.3/opencode-windows-x64-baseline.zip",
      "integrity": "SHA-256 0d59113484bfe8d6dc146fc981f5c33faa8318303c183711b7a9387060b289e8 of the downloaded ZIP archive. Recorded to identify the tested artifact; no independent signature or provenance audit was performed."
    },
    "environment": [
      "Windows 11 x64; Python 3.12.10 harness. Raw timestamps use UTC.",
      "Fresh per-tool home, config, cache and temporary directories. Child environments used allowlisted OS/runtime paths without inherited account credentials. Only synthetic local files were used.",
      "Configuration isolation is a test control, not an operating-system sandbox.",
      "Auto-update, default plugins, model metadata fetching, LSP downloads and imported external agent configuration were disabled for the probes."
    ],
    "checks": [
      {
        "id": "opencode-cli-version",
        "name": "Pinned binary version",
        "method": "In an empty fixture directory, use fresh HOME/USERPROFILE and XDG config/cache/data/state paths. Set OPENCODE_DISABLE_AUTOUPDATE, OPENCODE_DISABLE_DEFAULT_PLUGINS, OPENCODE_DISABLE_LSP_DOWNLOAD, OPENCODE_DISABLE_CLAUDE_CODE and OPENCODE_DISABLE_MODELS_FETCH to true. Set OPENCODE_CONFIG_CONTENT to {\"permission\":\"deny\",\"share\":\"disabled\"}. Command argument array: [\"opencode\", \"--version\"].",
        "expected": "Print version 1.19.3.",
        "observed": "Exit 0. 1.19.3",
        "outcome": "pass"
      },
      {
        "id": "opencode-cli-config",
        "name": "Resolve explicit permissions",
        "method": "In an empty fixture directory, use fresh HOME/USERPROFILE and XDG config/cache/data/state paths. Set OPENCODE_DISABLE_AUTOUPDATE, OPENCODE_DISABLE_DEFAULT_PLUGINS, OPENCODE_DISABLE_LSP_DOWNLOAD, OPENCODE_DISABLE_CLAUDE_CODE and OPENCODE_DISABLE_MODELS_FETCH to true. Set OPENCODE_CONFIG_CONTENT to {\"permission\":\"deny\",\"share\":\"disabled\"}. Command argument array: [\"opencode\", \"--pure\", \"debug\", \"config\"].",
        "expected": "Resolve deny permissions and disabled sharing.",
        "observed": "Exit 0. Resolved configuration included permission={\"*\":\"deny\"}, share=\"disabled\", plugin=[], command={} and username=\"unknown\".",
        "outcome": "pass"
      },
      {
        "id": "opencode-cli-invalid-config",
        "name": "Reject an invalid permission value",
        "method": "In an empty fixture directory, use fresh HOME/USERPROFILE and XDG config/cache/data/state paths. Set OPENCODE_DISABLE_AUTOUPDATE, OPENCODE_DISABLE_DEFAULT_PLUGINS, OPENCODE_DISABLE_LSP_DOWNLOAD, OPENCODE_DISABLE_CLAUDE_CODE and OPENCODE_DISABLE_MODELS_FETCH to true. Set OPENCODE_CONFIG_CONTENT to {\"permission\":\"deny\",\"share\":\"disabled\"}. Replace OPENCODE_CONFIG_CONTENT with {\"permission\":\"not-a-permission\"}. Command argument array: [\"opencode\", \"--pure\", \"debug\", \"config\"].",
        "expected": "Reject the invalid permission value.",
        "observed": "Exit 1. Configuration validation reported Expected PermissionActionConfig for the invalid value.",
        "outcome": "pass"
      },
      {
        "id": "opencode-cli-server-unauthenticated",
        "name": "Local server authentication boundary",
        "method": "In an empty fixture directory, use fresh HOME/USERPROFILE and XDG config/cache/data/state paths. Set OPENCODE_DISABLE_AUTOUPDATE, OPENCODE_DISABLE_DEFAULT_PLUGINS, OPENCODE_DISABLE_LSP_DOWNLOAD, OPENCODE_DISABLE_CLAUDE_CODE and OPENCODE_DISABLE_MODELS_FETCH to true. Set OPENCODE_CONFIG_CONTENT to {\"permission\":\"deny\",\"share\":\"disabled\"}. Set OPENCODE_SERVER_PASSWORD to the synthetic fixture value ionbin-synthetic-password. Start opencode --pure serve --hostname 127.0.0.1 --port 50950; GET http://127.0.0.1:50950/config without an Authorization header. Stop the owned server after both requests.",
        "expected": "Return HTTP 401.",
        "observed": "HTTP 401. Response body was empty. Owned server process tree was stopped after the test; cleanup exit 0.",
        "outcome": "pass"
      },
      {
        "id": "opencode-cli-server-authenticated",
        "name": "Local server authenticated request",
        "method": "In an empty fixture directory, use fresh HOME/USERPROFILE and XDG config/cache/data/state paths. Set OPENCODE_DISABLE_AUTOUPDATE, OPENCODE_DISABLE_DEFAULT_PLUGINS, OPENCODE_DISABLE_LSP_DOWNLOAD, OPENCODE_DISABLE_CLAUDE_CODE and OPENCODE_DISABLE_MODELS_FETCH to true. Set OPENCODE_CONFIG_CONTENT to {\"permission\":\"deny\",\"share\":\"disabled\"}. Set OPENCODE_SERVER_PASSWORD to the synthetic fixture value ionbin-synthetic-password. Start opencode --pure serve --hostname 127.0.0.1 --port 50950; GET http://127.0.0.1:50950/config with HTTP Basic username opencode and that synthetic password. Stop the owned server after both requests.",
        "expected": "Return HTTP 200.",
        "observed": "HTTP 200. Returned configuration included permission={\"*\":\"deny\"}, share=\"disabled\" and plugin=[]. Owned server process tree was stopped after the test; cleanup exit 0.",
        "outcome": "pass"
      }
    ],
    "findings": [
      {
        "title": "Deny settings resolved, but tool enforcement remains untested",
        "basis": "observed",
        "severity": "informational",
        "detail": "The configuration command returned permission={\"*\":\"deny\"} and disabled sharing. This establishes configuration parsing, not whether every agent tool obeys those settings.",
        "practicalAdvice": "Inspect resolved settings and verify intended permission prompts in a disposable project before granting broader access."
      },
      {
        "title": "Password protected the tested local endpoint",
        "basis": "observed",
        "severity": "informational",
        "detail": "The same /config endpoint returned 401 without authentication and 200 with the synthetic password. Only this endpoint and the loopback listener were exercised.",
        "practicalAdvice": "Keep the server on loopback unless remote access is required; configure authentication and review any remote deployment separately."
      },
      {
        "title": "Default permissions deserve attention",
        "basis": "documented",
        "severity": "medium",
        "detail": "The v1 permission documentation allows most actions by default, with specific exceptions and safeguards. Plugins and model providers introduce additional code and data boundaries.",
        "practicalAdvice": "Choose explicit permissions and review provider and plugin configuration before using a private repository."
      }
    ],
    "caveats": [
      "The tested artifact is the official v1.19.3 Windows baseline release. Current upstream material also advertises v2 and @opencode/cli; these results do not transfer to that runtime.",
      "No model requests were made. Configuration output and two HTTP responses do not establish coding quality, prompt-injection resistance or complete server authorization."
    ],
    "notTested": [
      "Model calls, generated-code quality, tool execution, prompt-injection resistance and enforcement of deny permissions during an agent session.",
      "Provider authentication, paid usage, plugins, MCP servers, remote exposure and the separate OpenCode v2 runtime."
    ],
    "sources": [
      {
        "label": "OpenCode repository and version transition",
        "url": "https://github.com/anomalyco/opencode"
      },
      {
        "label": "CLI commands and configuration flags",
        "url": "https://opencode.ai/docs/cli/"
      },
      {
        "label": "Permission configuration",
        "url": "https://opencode.ai/docs/permissions/"
      },
      {
        "label": "Local server authentication",
        "url": "https://opencode.ai/docs/server/"
      },
      {
        "label": "MIT license",
        "url": "https://github.com/anomalyco/opencode/blob/dev/LICENSE"
      },
      {
        "label": "Evaluated v1.19.3 release",
        "url": "https://github.com/anomalyco/opencode/releases/tag/v1.19.3"
      }
    ],
    "reportUrl": "/interface-evaluations/opencode-cli.json"
  }
}
