Skip to content

Viewer has no authentication: bind a unix socket by default or require a startup-minted token #223

Closed

Description

@abogartz

Finding

No token, cookie or per-user check exists anywhere in the viewer request path (src/viewer/server.ts). The Host/Origin/CSRF layer is sound and should stay, but setting OPENCODE_VIEWER_HOST=0.0.0.0 - the documented way to reach the viewer from another machine - makes edit, delete, block and restore unauthenticated HTTP for the whole LAN, with the entire store as blast radius. The startup warning (shipped via #13) is good UX; it is not access control.

Fix direction

Bind a unix socket by default (no port, no LAN reach), or require a bearer token minted at startup and stored 0600 beside the store (depends on the store file-modes ticket). Keep the Host/Origin layer either way: it is the CSRF defence, not the auth layer.

Source

Architecture review 2026-10-31, finding S2 (Med). Extends beyond the documentation-only #13 (closed).

Activity

  1. added
    enhancement
    store-security
    severity:medium
    agent:ready
    on Nov 1, 2026
  2. ocsi-triager commented on Nov 3, 2026

    @ocsi-triager

    osi-spec-hash: 0d48eb22a683a11b 2026-11-03T23:48:58Z - acceptance criteria frozen at this text. A later edit to the body changes this hash, and the reviewer will withhold approval until a maintainer replies spec ok.

  3. added
    fix:pr-open
    on Nov 3, 2026
  4. abogartz-opencode-self-improvement commented on Nov 4, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.15.22 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  5. abogartz-opencode-self-improvement commented on Nov 4, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.15.30 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:readyenhancementfix:pr-openreleasedseverity:mediumstore-security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions