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
Complements the auth/validation/error-sanitization work in #444 with additional MCP surface fixes:
No upper bound on limit
mcp/server_support.py:81-94 — _clamp_limit enforces max(1, limit) but no upper bound. limit=10000000 → gigabyte JSON response, potential server crash.
search and list_conversations asymmetric filter surfaces
mcp/server_tools.py:31-122 — search can't filter by tag/title. list_conversations can't do FTS. Users needing "conversations with tag X about Y" are stuck.
resolve_id prefix matching dangerous on destructive ops
storage/backends/queries/conversations_identity.py:15-31 — delete_conversation(id="abc") deletes "abc123" if it's the only prefix match. Adding "abc456" later changes behavior from delete to ambiguity error. Destructive operations should require exact ID match.
get_stats_by passes user-controlled string through fragile whitelist
storage/backends/queries/stats.py:222-251 — validated by if/elif branches with safe fallback, not by type-level Literal["provider", "month", "year"]. Fragile if a branch is added that interpolates the value.
bulk_tag_conversations O(N×M) in separate transactions
mcp/server_mutation_tools.py:48-71 — nested for-loops, each add_tag has its own transaction + round-trip. No item-count limit.
Fix direction
Add min(limit, 1000) upper bound to _clamp_limit
Add tag/title/sort params to search, or merge into one unified tool
Add strict=True flag to resolve_id for destructive operations
Use Literal["provider", "month", "year"] for group_by
Batch tag operations in a single transaction with a size limit
Ref: #444
Discovered during adversarial audit 2026-04-26.
Severity note (2026-04-26): The security.py bare except is sloppy but low-risk in practice (is_symlink() only raises OSError). The benchmark/devtools issues are developer-facing only with no user impact. The assert statements in production code are real but python -O is vanishingly rare. Focus remediation on the search degradation and diagnostics findings, which have real user impact.
Activity
Sinity commentedon Apr 26, 2026
Partially addressed by #489. Remaining items tracked in this issue.
fix(storage): raise on unknown get_stats_by group_by; close #476 (#527)
fix(storage): raise on unknown get_stats_by group_by; close #476 (#527)