Intent-Code Divergence
Medium
- Confidence
- 96% confidence
- Finding
- The SSE section says the backend authenticates subscriptions using `req.user.id`, but the frontend example connects with `EventSource('/api/events?userId=...')`. This mismatch can encourage implementers to trust a client-supplied `userId` in a query string, which can lead to insecure direct object reference or subscription confusion if copied into real code. In a security-sensitive auth section, contradictory examples are especially risky because developers often paste examples verbatim.
