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
security(api): routes with no auth beside gated siblings — public /api/redis-service/status, analytics task status and clear-stuck, batch-jobs load/chat-init #18718
Verified on origin/main 0196c7c234 (umbrella #18717). There is no global user-auth middleware (only service auth), and route_dependencies._BY_ROUTER_NAME covers only chat, so a handler without its own Depends is public.
autobot-backend/api/redis_service.py:248GET /api/redis-service/status: docstring says "No authentication required (public endpoint)". Its siblings stop/start/restart are gated, and the SLM copy is gated at mount (autobot-slm-backend/main.py:708, _SM). Decide whether "public" is intended; if not, gate it.
api/analytics.py:1259GET /dashboard/overview/status/{task_id} and :1273POST /dashboard/overview/tasks/clear-stuck: no auth; /dashboard/overview/analyze (:1244) has Depends(get_current_user). The report's "5 gated siblings" is wrong: most of the other clear-stuck and status routes are ungated too (code_intelligence.py:2045/2070, codebase_analytics/endpoints/{dependencies,duplicates,import_tree,pattern_analysis}.py); only analytics_bug_prediction.py:931 uses check_admin_permission. Impact is low (clear-stuck is a no-op; status needs a task UUID), but it is a class.
api/batch_jobs.py/status (:766), /load (:784), /chat-init (:838): no Depends, while every other route in the file uses get_current_user.
Acceptance criteria
Every route above has an explicit auth dependency or is recorded as deliberately public, with the reason, in one place.
The task status and clear-stuck routes are gated as a class: one dependency on their routers, not per-handler copies.
A guard (router auth enumerator) fails on a new handler with no auth in these routers.
Activity
fix(api): POST /batch-jobs/load requires an authenticated user like t…
fix(auth): stopping Redis and deleting audit logs are human-admin-onl…
fix(analytics): pattern task revoke/result/list routes gated; bug-pre…
fix(auth): clear-stuck routes and the pattern task revoke refuse the …
test(guards): factory forwards response_model; parity-resolvable test…
fix(auth): clear-all and index/cancel are human-admin-only; real-gate…
refactor(auth): HUMAN_ADMIN_DEPENDENCIES has one home, security/human…
fix(train): train-35 CodeRabbit findings fixed in the train (#18718, #…