Skip to content

security: harden API rate and resource limits - #1

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

yashvatsdev merged 1 commit into
mainfrom
security/resource-hardening

Conversation

@yashvatsdev

Copy link
Copy Markdown
Owner

Summary

Hardens CodeLens against API abuse and repository resource exhaustion.

Phase 1 — API Rate Limiting

  • Added application-level API rate limiting
  • Added stricter limits for authentication, repository, scan, and AI endpoints
  • Added standardized 429 responses
  • Added rate-limit regression tests

Phase 2 — Resource Exhaustion Protection

  • Added GitHub repository tree-size protection
  • Added aggregate source-size protection
  • Preserved file-count and individual-file-size limits
  • Prevented duplicate scans for the same repository
  • Added safe 413 responses for oversized repositories
  • Added resource-limit regression tests

Validation

  • 425 backend tests passing
  • 0 failures
  • 0 skipped
  • git diff --check clean
  • No frontend changes
  • No database migrations
  • No secrets committed

@yashvatsdev
yashvatsdev merged commit a09b72f 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