fix(api): bound queue intelligence request size - #496
Merged
JSONbored merged 1 commit intoJun 10, 2026
Conversation
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | b884696 | Commit Preview URL Branch Preview URL |
Jun 10 2026, 06:59 AM |
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
This was referenced Jun 10, 2026
This was referenced Jun 10, 2026
JSONbored
force-pushed
the
codex/propose-fix-for-queue-intelligence-vulnerability
branch
2 times, most recently
from
June 10, 2026 06:53
7681ca4 to
346b05c
Compare
JSONbored
force-pushed
the
codex/propose-fix-for-queue-intelligence-vulnerability
branch
from
June 10, 2026 06:57
346b05c to
b884696
Compare
JSONbored
deleted the
codex/propose-fix-for-queue-intelligence-vulnerability
branch
June 10, 2026 07:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
POST /v1/internal/queue-intelligenceendpoint could accept unbounded arrays and long strings, parse and validate them, then sort and echo them back, allowing privileged callers to exhaust Worker CPU/heap and response bandwidth.expensivebucket.Description
QUEUE_INTELLIGENCE_MAX_BODY_BYTES,QUEUE_INTELLIGENCE_MAX_PULL_REQUESTS,QUEUE_INTELLIGENCE_MAX_AUTHOR_LENGTH,QUEUE_INTELLIGENCE_MAX_TITLE_LENGTH,QUEUE_INTELLIGENCE_MAX_BODY_LENGTH, andQUEUE_INTELLIGENCE_MAX_DUPLICATE_CANDIDATESinsrc/api/routes.ts.readRequestBodyWithLimitandparsePositiveIntto return413for oversized payloads and avoid unboundedc.req.json()parsing..max()on the PR array and.max()limits onauthor,title,body, andduplicateCandidatesin the PR schema so validation and downstreamanalyzePRQueuework on bounded inputs.expensiveinsrc/auth/rate-limit.tsso it uses stricter rate-limiting.test/integration/api.test.tsvalidating too-large payloads, excessive PR counts, and oversized PR fields are rejected, and add a unit assertion intest/unit/auth.test.tsthat the route is classifiedexpensive.Testing
npm run typecheckand succeeded.npx vitest run test/unit/auth.test.ts test/integration/api.test.tsand all targeted tests passed.git diff --checkand no issues were reported.Codex Task