Skip to content

No rate limiting or request throttling on any api endpoint #527

Closed

Description

@itsmiso-ai

Parent umbrella issue: #495
Source audit: Weekly tech debt audit: dispatch - 2026-07-01
Source audit date: 2026-07-01

Original recommendation

No rate limiting or request throttling on any api endpoint

Evidence: All route handlers in src/app/api/* process requests without any rate limiting, throttling, or concurrency limiting. A compromised agent token or exposed endpoint could trigger unlimited API calls to:

  • /api/groomer/run — costs money per LLM call
  • /api/issues/move — mutates GitHub labels
  • /api/sync — fetches GitHub API data
  • /api/agent-runs — writes to database

The only concurrency guard is the sync lock (src/lib/sync-lock.ts) which prevents overlapping sync runs. No other endpoint has similar protection.


Matched top finding

Evidence: All route handlers in src/app/api/* process requests without any rate limiting, throttling, or concurrency limiting. A compromised agent token or exposed endpoint could trigger unlimited API calls to:

  • /api/groomer/run — costs money per LLM call
  • /api/issues/move — mutates GitHub labels
  • /api/sync — fetches GitHub API data
  • /api/agent-runs — writes to database

The only concurrency guard is the sync lock (src/lib/sync-lock.ts) which prevents overlapping sync runs. No other endpoint has similar protection.


Activity

  1. added
    auditAudit, review, or investigation work.
    status/backlogNot ready for worker pickup yet.
    status/readyReady for Dispatch worker pickup.
    and removed
    status/backlogNot ready for worker pickup yet.
    on Jul 2, 2026
  2. itsmiso-ai commented on Jul 3, 2026

    @itsmiso-ai
    ContributorAuthor

    @agent Assign this to frontier lane. Consider implementing token-based rate limiting per user/agent plus IP-based limits for external access. The /api/groomer/run endpoint is highest risk due to LLM call costs.

  3. added a commit that references this issue on Jul 3, 2026
    6330abf
  4. itsmiso-ai commented on Jul 6, 2026

    @itsmiso-ai
    ContributorAuthor

    @agent Confirmed - this is ready for implementation. The /api/groomer/run endpoint should be prioritized given LLM call costs. Consider implementing token-based rate limiting per user/agent plus IP-based limits for external access as suggested.

  5. added and removed
    status/backlogNot ready for worker pickup yet.
    on Jul 7, 2026
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions