๐ก๏ธ Sentinel: [HIGH] hmac.compare_digest Non-ASCII DoS ์ทจ์ฝ์ ์์ - #466
๐ก๏ธ Sentinel: [HIGH] hmac.compare_digest Non-ASCII DoS ์ทจ์ฝ์ ์์ #466seonghobae wants to merge 1 commit into
hmac.compare_digest Non-ASCII DoS ์ทจ์ฝ์ ์์ #466Conversation
|
๐ Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a ๐ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Warning Review limit reached
Next review available in: 54 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 |
| configured_keys = get_configured_api_keys() | ||
| if configured_keys and not (request.method == "GET" and request.url.path == "/"): | ||
| provided_key = request.headers.get("x-api-key", "") | ||
| provided_key_bytes = provided_key.encode('utf-8') | ||
| if not any( | ||
| hmac.compare_digest(provided_key, key) for key in configured_keys | ||
| hmac.compare_digest(provided_key_bytes, key.encode('utf-8')) for key in configured_keys |
There was a problem hiding this comment.
๐ Info: API keys still sourced from env, not KV
get_configured_api_keys reads CODEC_CARVER_API_KEYS from os.environ at saas_web.py, which AGENTS.md flags as a known deviation to migrate to the credential registry. This PR does not introduce or change that read; it only fixes the byte comparison.
Was this helpful? React with ๐ or ๐ to provide feedback.
Verified succession
Exact predecessor
eab80e615958cfaa56773b2733c16c4f3c5487a2์ ์ ํจ contract๋ non-ASCII raw API-key mismatch๊ฐ ์ฒ๋ฆฌ๋์ง ์์TypeError๋์ 401๋ก ๊ฑฐ์ ๋์ด์ผ ํ๋ค๋ ๊ฒ์ ๋๋ค. Canonical #520 exactcf730d007543ee828b7b8e77c9473288924047d4๊ฐ raw ASGI header bytes๋ฅผ ์ง์ ์ฝ์ด ๋์ผ behavior๋ฅผ ๋ณด์กดํ๊ณ configured Unicode credential success์ duplicate-header fail-closed๊น์ง ๋ ๊ฐํ๊ฒ ๊ฒ์ฆํฉ๋๋ค.#466์ decoded framework string UTF-8 ์ฌ์ธ์ฝ๋ฉ ๋ฐ JSONResponse mock ๊ธฐ๋ฐ rejection test๋ canonical raw-header executable tests๋ณด๋ค ์ฝํ๊ณ , blanket
.julesencoding ์ง์นจ์ valid Unicode credential์ byte identity๋ฅผ ํผ์ํ ์ ์์ต๋๋ค. ๋ณ๋ ์ ํจ delta๊ฐ ์์ผ๋ฏ๋ก ๋ชจ๋ ์ ํจ behavior/test intent๋ #520์ ์์ ์น๊ณ๋์ต๋๋ค.