Skip to content

security: protect AI provider resources - #2

Merged
yashvatsdev merged 1 commit into
mainfrom
security/ai-provider-hardening
Oct 4, 2026
Merged

yashvatsdev merged 1 commit into
mainfrom
security/ai-provider-hardening

Conversation

@yashvatsdev

Copy link
Copy Markdown
Owner

Summary

Adds AI-specific resource-exhaustion protections to CodeLens.

Protections

  • Caps AI prompt/context size at 120,000 characters
  • Caps generated AI output at 4,096 tokens
  • Adds a 60-second cloud provider timeout
  • Caps Ollama fallback output
  • Prevents unbounded cloud/fallback retry behavior
  • Preserves user-level AI rate limiting

Validation

  • 430 backend tests passing
  • 0 failures
  • 0 skipped
  • Phase 3 focused tests: 5 passed
  • compileall clean
  • git diff --check clean
  • No frontend changes
  • No database migrations
  • No secrets committed

@yashvatsdev
yashvatsdev merged commit d972e75 into main Oct 4, 2026
1 check passed
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.

1 participant