-
-
Notifications
You must be signed in to change notification settings - Fork 25
[BUG] Direct SQLite Bypass in Admin API, CLI, and MCP #37
Copy link
Copy link
Open
Labels
backendIssues involving server-side logic, databases, or APIsIssues involving server-side logic, databases, or APIsbugSomething isn't workingSomething isn't workinglevel:criticalIrrespective of difficulty, core work for the projectIrrespective of difficulty, core work for the projecttype:bugSmashes annoying bugsSmashes annoying bugs
Metadata
Metadata
Assignees
Labels
backendIssues involving server-side logic, databases, or APIsIssues involving server-side logic, databases, or APIsbugSomething isn't workingSomething isn't workinglevel:criticalIrrespective of difficulty, core work for the projectIrrespective of difficulty, core work for the projecttype:bugSmashes annoying bugsSmashes annoying bugs
Describe the Bug
The Admin API endpoints, CLI query tools
hp escalations/hp session, and the MCP toollist_recent_escalationsbypass the active swappable storage backend (Postgres/Redis) and query a local SQLite database directly usingsqlite3.connect().To Reproduce
Steps to reproduce the behaviour:
humane_proxy.yamlto use a non-default storage backend:hp escalations(or queryGET /admin/escalations).Expected Behaviour
The Admin API, CLI, and MCP server should query the active storage backend using the swappable storage factory (
get_store()) instead of opening direct, hardcoded SQLite connections.Actual Behaviour
The API (
admin.py), CLI (cli.py), and MCP Server (mcp_server.py) importsqlite3and callsqlite3.connect()directly to retrieve escalations, calculate statistics, and delete session logs.Environment
humane-proxy version)[ml],[mcp],[all], or none)