Skip to content

[CRITICAL] POST /supervisors/{type}/execute triggers real multi-worker LLM execution with no authentication #108

Description

@jsogarro

[CRITICAL] Unauthenticated supervisor execution endpoint

Summary
POST /api/v1/supervisors/{supervisor_type}/execute runs a hierarchical supervisor that coordinates multiple worker agents (real LLM calls) and declares no authentication dependency — any caller can trigger arbitrary, cost-incurring agent execution.

Evidence
src/api/routes/supervisor_api.py:86-93

@router.post("/{supervisor_type}/execute", response_model=SupervisorExecuteResponse)
async def execute_supervisor_task(
    supervisor_type: SupervisorType,
    request: SupervisorExecuteRequest,
    service: SupervisorCoordinationService = _SUPERVISOR_SERVICE_DEPENDENCY,
) -> SupervisorExecuteResponse:

The only dependency is the supervisor service itself; there is no identity check and no authority-reference gate (unlike the agent-execution endpoints, which at least require a client-supplied authority reference).

Failure scenario: an unauthenticated POST to /api/v1/supervisors/{supervisor_type}/execute with an arbitrary task payload runs the full supervisor→worker pipeline, incurring real LLM cost and consuming any downstream resources the supervisor touches.

Impact
Unauthenticated, unbounded triggering of expensive multi-agent LLM execution — a direct cost/DoS vector and a bypass of whatever authorization model the rest of the agent-execution API expects.

Remediation
Add an authentication dependency and, ideally, the same authority-reference gating pattern used in agent_api.py. Add a regression test asserting 401/403 for an unauthenticated request.

Acceptance

uv run pytest tests/test_supervisor_api.py -v

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions