Repository navigation
Description
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
- src/viewer/mutate.ts:104 — record('viewer_edit', {original, supersedes, reason, snapshot}) with ambient context
- src/viewer/mutate.ts:150 — record('prune', {mem, reason, snapshot, audit, tool:'memory_viewer'})
- src/viewer/mutate.ts:205 — record('quarantine_released'|'quarantine_release_noop', {mem, reason}, includeContext=false)
- src/memory.ts:833 — evidenceVisibleTo: no repo and no named sid reads as global
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
ocsi-triager commentedon Nov 3, 2026
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.
abogartz commentedon Nov 4, 2026
Decision sheet — verified current at
06e4e28The cited behavior still holds after the src/ restructure:
record("viewer_edit", …)insrc/viewer/mutate.tscarries no repo field, andevidenceVisibleTo(src/store/model/visibility.ts) still returnstruefor 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 holdtarget.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, ordefer. WM has offered a checked-in reproducer with the accepted fix.abogartz commentedon Nov 4, 2026
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.
abogartz commentedon Nov 4, 2026
Decision delivered 2026-11-04: accept A (see decision comment). Contract now tracked by #305; this record's job — the ruling — is done.