fix(job-analysis): bound pre-authentication request metadata - #88
fix(job-analysis): bound pre-authentication request metadata#88seonghobae wants to merge 6 commits into
Conversation
|
Warning Review limit reached
Next review available in: 16 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
📝 Info: Header parsing runs twice per request
_typed_headers runs once via _authorization_header (http.py:148) and again directly at http.py:173, so the header sequence is validated and lower-cased twice per request. Bounded and correct, just redundant work.
(Refers to this code)
Was this helpful? React with 👍 or 👎 to provide feedback.
|
@opencode-agent Please review the current unchanged head against protected |
Verified protected-main defect
Protected
develop@9e3e4847510e1e612b48474ba42b177b8ed824dfparsed attacker-controlled Job Analysis API request metadata before bearer authentication without application-owned budgets._typed_headers(...)iterated/lower-cased/stored an unbounded ASGI header sequence, and route recognition split a route-shaped path without an application path bound.This is an Orgmetra-owned transport availability boundary. No Keyverse or other dedicated-writer repository is changed.
RED first
Exact RED head
48d938d2c751f7dddafdcb6d4dd10fbfa57d874dadded only the header-budget regression. Job-Analysis API Quality run32601527276, job97100416229, checked out that exact SHA and failed only the two new budget tests: excessive header count and excessive aggregate header bytes were both accepted. The other 69 tests passed and existing owned production remained at 100% statement/branch coverage, isolating the causal boundary to missing request-metadata budgets.The regression was then strengthened for an oversized route-shaped path before the final repair.
Root-cause repair
Current exact head:
0dc4f09cc3c87829ea1e3a0e3dc0188df07ad8cd.Authorization+X-Purpose-Code, accepts no query parameters, and now documents request-metadata budgets.These limits align with Orgmetra's already-reviewed People HTTP transport budgets rather than weakening a gateway or relying on a foreign dependency.
Exact-current-head GREEN evidence
All applicable hosted workflows are terminal GREEN on unchanged head
0dc4f09cc3c87829ea1e3a0e3dc0188df07ad8cd:32601723497— unit job checks out the exact head; 72 tests passed; owned production totals 603 statements / 214 branches at exact 100% statement and branch coverage; PostgreSQL integration also passed.32601723498— terminal success, including repository validation and PostgreSQL integrity matrix.32601723512— terminal success.32601723524— terminal success.32601723530— terminal success.Fresh Devin review is
COMMENTEDonly. Its sole unresolved thread is explicitly informational:_typed_headerscurrently performs the same already-bounded header normalization twice per accepted request. With the new 64-frame/16 KiB caps this is bounded redundant work, not an authentication/authorization/privacy/data-integrity bypass or a gate failure, so it is intentionally not marked resolved and does not justify another behavior-changing repair in this security fix. No qualifying independent non-authorAPPROVEorCHANGES_REQUESTEDexists.The PR is ready for independent review but intentionally unmerged until the qualifying independent-review gate is satisfied on this unchanged head.