Skip to content

๐Ÿ›ก๏ธ Sentinel: [HIGH] hmac.compare_digest Non-ASCII DoS ์ทจ์•ฝ์  ์ˆ˜์ • - #466

Closed
seonghobae wants to merge 1 commit into
mainfrom
sentinel/fix-dos-vulnerability-hmac-9649564329394888065
Closed

๐Ÿ›ก๏ธ Sentinel: [HIGH] hmac.compare_digest Non-ASCII DoS ์ทจ์•ฝ์  ์ˆ˜์ •#466
seonghobae wants to merge 1 commit into
mainfrom
sentinel/fix-dos-vulnerability-hmac-9649564329394888065

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Verified succession

Exact predecessor eab80e615958cfaa56773b2733c16c4f3c5487a2์˜ ์œ ํšจ contract๋Š” non-ASCII raw API-key mismatch๊ฐ€ ์ฒ˜๋ฆฌ๋˜์ง€ ์•Š์€ TypeError ๋Œ€์‹  401๋กœ ๊ฑฐ์ ˆ๋˜์–ด์•ผ ํ•œ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. Canonical #520 exact cf730d007543ee828b7b8e77c9473288924047d4๊ฐ€ 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 .jules encoding ์ง€์นจ์€ valid Unicode credential์˜ byte identity๋ฅผ ํ›ผ์†ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ณ„๋„ ์œ ํšจ delta๊ฐ€ ์—†์œผ๋ฏ€๋กœ ๋ชจ๋“  ์œ ํšจ behavior/test intent๋Š” #520์— ์™„์ „ ์Šน๊ณ„๋์Šต๋‹ˆ๋‹ค.

@google-labs-jules

Copy link
Copy Markdown

๐Ÿ‘‹ 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review or push new commits to the PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 332e9be3-7482-41a1-9e29-1e94e757cd91

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between a8e4956 and eab80e6.

๐Ÿ“’ Files selected for processing (3)
  • .jules/sentinel.md
  • saas_web.py
  • tests/test_saas_web.py

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.

โค๏ธ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread saas_web.py
Comment on lines 113 to +118
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ“ 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.

Open in Devin Review

Was this helpful? React with ๐Ÿ‘ or ๐Ÿ‘Ž to provide feedback.

@seonghobae seonghobae closed this Sep 3, 2026
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