Skip to content

๐Ÿ›ก๏ธ Sentinel: [CRITICAL] hmac DoS(์„œ๋น„์Šค ๊ฑฐ๋ถ€) ์ทจ์•ฝ์  ์ˆ˜์ • - #502

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

๐Ÿ›ก๏ธ Sentinel: [CRITICAL] hmac DoS(์„œ๋น„์Šค ๊ฑฐ๋ถ€) ์ทจ์•ฝ์  ์ˆ˜์ •#502
seonghobae wants to merge 1 commit into
mainfrom
sentinel/fix-hmac-dos-10737230329305303880

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Verified succession

Exact predecessor 64f747c48d6cc4b367dce79af187b41f3b939eb2์˜ ์œ ํšจ ์š”๊ตฌ์‚ฌํ•ญ์€ raw b'\xff' API-key ์ž…๋ ฅ์ด ์ธ์ฆ ๊ฒฝ๊ณ„์—์„œ ์˜ˆ์™ธ๋ฅผ ๋งŒ๋“ค์ง€ ์•Š๊ณ  401๋กœ ๊ฑฐ์ ˆ๋˜์–ด์•ผ ํ•œ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. Canonical #520 exact cf730d007543ee828b7b8e77c9473288924047d4๊ฐ€ raw ASGI header bytes๋ฅผ ์ง์ ‘ ๋น„๊ตํ•˜๋ฏ€๋กœ ์ด ์ž…๋ ฅ์„ decode/re-encodeํ•˜์ง€ ์•Š๊ณ  ์•ˆ์ „ํ•˜๊ฒŒ ๊ฑฐ์ ˆํ•˜๋ฉฐ, valid Unicode credential successยทinvalid Unicode rejectionยทduplicate-header fail-closed๊นŒ์ง€ executable contract๋กœ ๋ณด์œ ํ•ฉ๋‹ˆ๋‹ค.

#502์˜ .encode('utf-8', errors='replace')๋Š” framework-decoded credential์„ lossyํ•˜๊ฒŒ ๋ฐ”๊พธ๋Š” ๋ณ„๋„ ํšŒ๊ท€ ๊ฐ€๋Šฅ์„ฑ์ด ์žˆ์–ด ์Šน๊ณ„ํ•  ์œ ํšจ source delta๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค. ๋™์ผํ•œ errors='replace' blanket ์ง€์นจ๋„ credential byte identity๋ฅผ ๋ณด์กดํ•˜์ง€ ๋ชปํ•˜๋ฏ€๋กœ canonical .jules guidance์—์„œ ์ฑ„ํƒํ•˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค. ๋ชจ๋“  ์œ ํšจ behavior/test contract๋Š” stronger successor #520์— ์™„์ „ ์Šน๊ณ„๋๊ณ , #520์€ protected main@90717c6e9954bf3b7a351137995ebe89975e46c2 ๋Œ€๋น„ behind_by=0์ธ non-force descendant์ž…๋‹ˆ๋‹ค.

@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 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 57 minutes.

View limit details

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.

Learn how review limits work.

Review configuration:

โš™๏ธ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2feb8dc6-5507-4506-bc17-ef475ed21b89

๐Ÿ“ฅ Commits

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

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

Devin Review

Comment thread saas_web.py
provided_key_bytes = provided_key.encode('utf-8', errors='replace')
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.

๐ŸŸจ API keys bypass credential registry

Each authenticated request still loads API keys through get_configured_api_keys from the process environment. Runtime secrets remain exposed outside the mandated credential registry.

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