Skip to content

Policy: should viewer action evidence inherit the target repository? #212

Closed

Description

@WhollyMindless

Proposed classification: question, store-security, severity:low. Labels require maintainer permissions; these are suggestions for your triage.

For maintainer triage and approval of scope. Reviewed main at bf9f4d2, still current when these proposals were prepared. Review probes use synthetic temporary stores; this is not a report of a production incident. No implementation or assignment is implied by this issue.

SEC-03: Viewer-originated evidence lines are unstamped, so every repository's memory_evidence shows actions on other repositories' private rows

Reproduction: test/review-probes/probe-viewer-evidence-visibility.probe.ts: in a scope-less (viewer-shaped) process, editMemory, deleteMemory and releaseQuarantinedMemory on repo-B rows with distinctive reasons. Record a repo-B-stamped control line. From a repo-A plugin session, call memory_evidence({}).

Observed: Repo A sees ev=viewer_edit ... original=<B ts> reason="B_OPERATOR_REASON acquisition of Contoso" snapshot=<path>, ev=prune ... mem=<B ts> reason=B_DELETE_REASON ... tool=memory_viewer and ev=quarantine_released mem=<B ts> reason=B_RELEASE_REASON. The repo-B-stamped control line is correctly hidden, which shows the reader was repo-scoped, not admin.

Effect: Operator-authored reasons (free text, credential-redacted but otherwise verbatim) and row ids for another repository's private rows become readable by any repository's sessions. The ids enable SEC-02. This contradicts README §scoping: 'only an explicitly global (or predating-stamps) line reads as global'. Viewer lines are neither.

Preconditions: A human uses the viewer to edit, delete, or release a repo-private row.

Limits: The evidenceVisibleTo code comment describes the global reading of no-stamp/no-sid lines as intentional for 'out-of-plugin maintenance write'. The maintainer may consider viewer lines covered by that intent. The README sentence quoted above reads otherwise.

Proposed scope / decision requested

Please decide whether new viewer edit/delete/quarantine-release events should be stamped with the target row's repository, while the admin viewer still sees all rows. Parent reproduced cross-repository visibility of IDs and operator reasons. The code intentionally treats ambient maintenance as global, while README framing suggests otherwise, so this is a policy/contract question rather than an assumed decision. If accepted, preserve global/legacy behavior explicitly. Adjacent to #199/#202 but deliberately separate.

Please accept, narrow, defer, or decline this independently of the other review findings. We will wait for your direction before taking implementation. Happy to supply a checked-in regression reproducer with an accepted fix; the review report and probe artifacts are preserved locally.

Activity

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

    @ocsi-triager

    osi-spec-hash: 443d0a95490415a7 2026-11-03T23:52:48Z - 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. removed
    agent:ready
    on Nov 4, 2026
  4. abogartz commented on Nov 4, 2026

    @abogartz
    Owner

    Decision sheet — verified current at 06e4e28

    The cited behavior still holds after the src/ restructure: record("viewer_edit", …) in src/viewer/mutate.ts carries no repo field, and evidenceVisibleTo (src/store/model/visibility.ts) still returns true for lines with neither repo nor sid.

    Option A — evidence inherits the target row's repository (recommended).
    Viewer edit/delete/quarantine-release events are stamped with the repo of the row acted on; acting on a truly global row still yields a global line. Admin viewer unchanged. README §scoping becomes true as written. Cost: small — the three record() call sites already hold target.repo; add a checked-in regression probe.

    Option B — A, plus tighten the reader rule.
    Also make no-stamp/no-sid lines admin-only, closing the same leak for every future writer, not just the viewer. Cost: touches the deliberate out-of-plugin-maintenance carve-out the code comment defends; every ambient writer's lines disappear from repo sessions. Broader blast radius than the finding requires.

    Option C — decline; the global reading is intended.
    Keep viewer lines global as maintenance writes and amend README §scoping to say so explicitly. Cost: docs only. Security cost stays: any repo's sessions keep reading operator reasons and row ids for other repos' private rows.

    Recommendation: A. It is the smallest change that makes the documented contract true, and it preserves the maintenance carve-out for genuinely global writes.

    Maintainer: reply accept A, accept B, accept C, or defer. WM has offered a checked-in reproducer with the accepted fix.

  5. abogartz commented on Nov 4, 2026

    @abogartz
    Owner

    Maintainer decision 2026-11-04: accept A — viewer-originated evidence inherits the target row's repository; global rows keep global lines; admin viewer unchanged. Implementation queued as #305. This decision record stays as the contract; close it when #305 merges.

  6. abogartz commented on Nov 4, 2026

    @abogartz
    Owner

    Decision delivered 2026-11-04: accept A (see decision comment). Contract now tracked by #305; this record's job — the ruling — is done.

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

    questionseverity:lowstore-security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions