Skip to content

fix(dashboard): restrict tasks/queue leak and gate config to admin - #13

Draft
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/critical-bug-management-e6bd
Draft

fix(dashboard): restrict tasks/queue leak and gate config to admin#13
cursor[bot] wants to merge 1 commit into
masterfrom
cursor/critical-bug-management-e6bd

Conversation

@cursor

@cursor cursor Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Bug and impact

Multi-user dashboard deployments had two incomplete auth fixes after PR #4:

  1. kernel_exec tasks / queue — Non-admin users could read other users' AgentTask instructions (up to 240 chars) and global inflight/cancelled session IDs. kernel_snapshot also returned unfiltered queue data.
  2. /api/config/* — Any authenticated user could read full config.yaml (API keys, tokens) and overwrite daemon configuration.

Root cause

Session isolation was applied to ps, sessions, inspect, and kill verbs but not tasks/queue. Config endpoints only required authentication, not admin role.

Fix

  • Add _filter_agent_tasks_for_user and _filter_queue_for_user; apply in kernel_exec and kernel_snapshot.
  • Add _require_dashboard_admin gate on all config read/write/backup routes when dashboard auth is enabled (admin user or bearer token).

Validation

  • uv run pytest tests/test_dashboard_auth.py -v — 15 passed
Open in Web View Automation 

PR #4 locked down ps/sessions/inspect/kill but left kernel_exec tasks and
queue returning global AgentTask instructions and inflight session IDs to
any logged-in user. kernel_snapshot queue was also unfiltered.

Config read/write/backup endpoints only required authentication, letting
non-admin users read API keys and overwrite daemon config.

Add per-user filters for tasks and queue, apply queue filter in snapshot,
and require admin (or bearer token) when dashboard auth is enabled.

Co-authored-by: Yuxuan Liu <Osc-7@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant