Skip to content

fix: add resource limit in ai-chat.js (CWE-770) - #291

Merged
midudev merged 2 commits into
midudev:mainfrom
anupamme:fix-repo-codi-link-cwe-770-client-rate-limit
Oct 20, 2026
Merged

midudev merged 2 commits into
midudev:mainfrom
anupamme:fix-repo-codi-link-cwe-770-client-rate-limit

Conversation

@anupamme

Copy link
Copy Markdown
Contributor

The client-side AI chat implementation sends requests to the backend AI endpoint without any client-side rate limiting, throttling, or exponential backoff. While the backend implements rate limiting (BURST_LIMIT=12, DAILY_LIMIT=50), the client provides no additional protection layer, allowing rapid successive requests that can quickly hit backend limits. The affected code is src/ai-chat.js:285. This change is the fix I would apply.

Reference: CWE-770

What changed

  • src/ai-chat.js

Verification

No automated check could be run against this repository, so this change is unverified beyond review. Please treat it as a suggestion.


Automated security fix by OrbisAI Security

@midudev
midudev merged commit b3b935b into midudev:main Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants