Skip to content

sec(slm): /events/sync endpoint missing authentication #3452

Description

@mrveiss

Problem

`autobot-slm-backend/api/events.py` exposes:

  • `POST /events/sync`

No authentication dependency is present on the router or the endpoint. An
unauthenticated caller can push arbitrary event data into the SLM event
stream.

Fix

Add auth dependency to the router:
```python
from services.auth import get_current_user
router = APIRouter(
prefix="/events",
tags=["events"],
dependencies=[Depends(get_current_user)],
)
```

If `/events/sync` is intended as an internal service-to-service endpoint,
it should use service token auth from `autobot_shared` instead of being
fully open.

Discovery

Found during auth coverage audit triggered by PR #3438 (#3423 fix).

Activity

  1. mrveiss commented on Apr 4, 2026

    @mrveiss
    OwnerAuthor

    Investigated in PRs #3459 and #3472. The endpoint is intentionally unauthenticated — agents identify by node_id validated in the endpoint body. PR #3472 reverts the broken get_current_user approach and documents the security model.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions