You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generic memory/episode/raw-turn scope assertions are no-ops #593
macOS arm64; Memmy desktop 1.2.0; memmy-memory-runtime/service 2.1.3; SQLite schema 9; local service at 127.0.0.1:18960. Summary/evolution/embedding configured through Memmy account. These observations were collected on 2026-10-09. Code locations refer to the installed package under ~/.memmy/memory-service/runtime/2.1.3/darwin-arm64/dist/src/, not verified GitHub permalinks.; single-user local installation. No cross-user or cross-project mutation was attempted.
Trace their callers in get/delete/archive and retrieval paths.
In an isolated test environment, create two namespaces and verify that out-of-scope access is rejected. This negative test remains unperformed here.
Expected / actual
Generic assertion methods discard both parameters. Their names/call sites suggest enforcement, but they cannot enforce scope. v2 L3 has additional explicit checks, so this report does not claim every route is unprotected.
Please either implement the intended checks, or clearly document whole-local-store semantics and remove misleading assertions. Distinguish a relevance/project filter from an authorization boundary.
Evidence
service/memory-service.js:1906: three empty assertion methods.
Same file:1193 (deleteMemory): generic memories call assertMemoryInScope; strict v2 L3 follows separate checks.
service/retrieval/indexed-candidate-pool.js:49: candidates filtered by layer/status/tags with selective L1 work-memory scope.
service/memory-service.js:2126: scopeBundleTables also ignores namespace; export is whole-store, not a namespace-restricted sharing artifact.
This is static evidence of missing generic enforcement, not a demonstrated exploit.
Related: #463 discusses local authentication/namespace access. This report focuses on the generic memory/episode/raw-turn assertion methods.
No credentials, private conversation text or database attachments are included. No configuration changes were performed for this report.
Confirmed the root cause on main: in Memory/src/service/memory-service.ts (assertMemoryInScope ~L2847, assertEpisodeInScope ~L2852, assertRawTurnInScope ~L2857) all three assertion bodies are just void memory; void namespace; — they discard both parameters and enforce nothing, while call sites in the get/delete/archive/retrieval paths treat them as a scope boundary.
I'm working on a conservative fix: implement the intended checks (throw a scope error when a namespace is provided and doesn't match the row's namespace; keep the current whole-store behavior when namespace is absent, so single-namespace local users see zero change), plus a negative test with two namespaces where a cross-namespace access is rejected. The v2 L3 explicit checks will be left untouched.
Note: this fix is prepared with AI assistance (Claude Code), submitted by a human contributor.
PR opened: #611 (branch fix/593-scope-assertions), implementing the conservative fix described in my claim comment above, with the cross-namespace negative tests requested in the report.
Activity
akushonkamen commentedon Oct 12, 2026
Confirmed the root cause on
main: inMemory/src/service/memory-service.ts(assertMemoryInScope~L2847,assertEpisodeInScope~L2852,assertRawTurnInScope~L2857) all three assertion bodies are justvoid memory; void namespace;— they discard both parameters and enforce nothing, while call sites in the get/delete/archive/retrieval paths treat them as a scope boundary.I'm working on a conservative fix: implement the intended checks (throw a scope error when a namespace is provided and doesn't match the row's namespace; keep the current whole-store behavior when namespace is absent, so single-namespace local users see zero change), plus a negative test with two namespaces where a cross-namespace access is rejected. The v2 L3 explicit checks will be left untouched.
Note: this fix is prepared with AI assistance (Claude Code), submitted by a human contributor.
akushonkamen commentedon Oct 12, 2026
PR opened: #611 (branch
fix/593-scope-assertions), implementing the conservative fix described in my claim comment above, with the cross-namespace negative tests requested in the report.