Skip to content

๐Ÿ›ก๏ธ Sentinel: [HIGH] ๋น„ ASCII ๋ฌธ์ž๋ฅผ ํ†ตํ•œ hmac.compare_digest DoS ์ทจ์•ฝ์  ์ˆ˜์ • - #303

Closed
seonghobae wants to merge 2 commits into
mainfrom
sentinel-hmac-dos-fix-1679098434707941554
Closed

๐Ÿ›ก๏ธ Sentinel: [HIGH] ๋น„ ASCII ๋ฌธ์ž๋ฅผ ํ†ตํ•œ hmac.compare_digest DoS ์ทจ์•ฝ์  ์ˆ˜์ •#303
seonghobae wants to merge 2 commits into
mainfrom
sentinel-hmac-dos-fix-1679098434707941554

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

๐Ÿšจ Severity: HIGH
๐Ÿ’ก Vulnerability: hmac.compare_digest()๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ API ํ‚ค๋ฅผ ๋น„๊ตํ•  ๋•Œ, ๋น„ ASCII ๋ฌธ์ž๊ฐ€ ํฌํ•จ๋œ ๋ฌธ์ž์—ด์ด ์ž…๋ ฅ๋˜๋ฉด TypeError๊ฐ€ ๋ฐœ์ƒํ•˜์—ฌ ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ํฌ๋ž˜์‹œ(500 Server Error)๋ฅผ ์œ ๋ฐœํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๐ŸŽฏ Impact: ์•…์˜์ ์ธ ๊ณต๊ฒฉ์ž๊ฐ€ ์กฐ์ž‘๋œ x-api-key ํ—ค๋”๋ฅผ ๋ฐ˜๋ณต์ ์œผ๋กœ ์ „์†กํ•˜์—ฌ ์„œ๋ฒ„ ์ž์›์„ ๊ณ ๊ฐˆ์‹œํ‚ค๋Š” ์„œ๋น„์Šค ๊ฑฐ๋ถ€(DoS) ๊ณต๊ฒฉ์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๐Ÿ”ง Fix: hmac.compare_digest()๋ฅผ ํ˜ธ์ถœํ•˜๊ธฐ ์ „์— ์ž…๋ ฅ๋œ API ํ‚ค์™€ ์„ค์ •๋œ ํ‚ค๋ฅผ ๋ชจ๋‘ utf-8 ๋ฐ”์ดํŠธ๋กœ ์ธ์ฝ”๋”ฉํ•˜์—ฌ ์•ˆ์ „ํ•˜๊ฒŒ ๋น„๊ตํ•˜๋„๋ก ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
โœ… Verification: ๋น„ ASCII ๋ฌธ์ž๊ฐ€ ํฌํ•จ๋œ ํ—ค๋”๋ฅผ ์ „์†กํ•˜๋Š” ํ…Œ์ŠคํŠธ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•˜์—ฌ ์ •์ƒ์ ์œผ๋กœ 401 ์˜ค๋ฅ˜๊ฐ€ ๋ฐ˜ํ™˜๋จ์„ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค.


PR created automatically by Jules for task 1679098434707941554 started by @seonghobae

Summary by CodeRabbit

  • ๋ฒ„๊ทธ ์ˆ˜์ •

    • ๋น„ASCII ๋ฌธ์ž๊ฐ€ ํฌํ•จ๋œ API ํ‚ค๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ๋Š” ์„œ๋ฒ„ ์˜ค๋ฅ˜๋ฅผ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • API ํ‚ค ์ธ์ฆ์ด ์˜ˆ๊ธฐ์น˜ ์•Š๊ฒŒ ์ค‘๋‹จ๋˜๊ฑฐ๋‚˜ ์„œ๋น„์Šค ๊ฑฐ๋ถ€๋กœ ์ด์–ด์ง€๋Š” ๋ฌธ์ œ๋ฅผ ๋ฐฉ์ง€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๋ฌธ์„œ

    • ๊ด€๋ จ ๋ณด์•ˆ ์ทจ์•ฝ์ ๊ณผ ๋Œ€์‘ ๋ฐฉ๋ฒ•์„ ๋ฌธ์„œํ™”ํ–ˆ์Šต๋‹ˆ๋‹ค.

@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 Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. ๐ŸŽ‰

โ„น๏ธ Recent review info
โš™๏ธ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: aa019451-dace-4011-9f52-8df6ad08ca92

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 5a92586 and e8c6f9d.

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

๐Ÿ“ Walkthrough

Walkthrough

API ํ‚ค ์ธ์ฆ ๋น„๊ต ์‹œ ์–‘์ชฝ ๋ฌธ์ž์—ด์„ UTF-8 ๋ฐ”์ดํŠธ๋กœ ๋ณ€ํ™˜ํ•˜๋„๋ก ์ˆ˜์ •ํ•˜๊ณ , ๋น„ ASCII ์ž…๋ ฅ์œผ๋กœ ์ธํ•œ TypeError ๋ฐ 500 ์˜ค๋ฅ˜ ๋Œ€์‘ ๋‚ด์šฉ์„ ๋ฌธ์„œํ™”ํ–ˆ์Šต๋‹ˆ๋‹ค.

Changes

API ํ‚ค ์ธ์ฆ ๋ณด์™„

Layer / File(s) Summary
UTF-8 ๋ฐ”์ดํŠธ ๊ธฐ๋ฐ˜ API ํ‚ค ๋น„๊ต
saas_web.py, .jules/sentinel.md
require_api_key๊ฐ€ ๊ตฌ์„ฑ๋œ ํ‚ค์™€ ์ œ๊ณต๋œ ํ‚ค๋ฅผ UTF-8 ๋ฐ”์ดํŠธ๋กœ ์ธ์ฝ”๋”ฉํ•ด ๋น„๊ตํ•˜๋ฉฐ, ๊ด€๋ จ ์ทจ์•ฝ์ ๊ณผ ์˜ˆ๋ฐฉ ์ง€์นจ์ด ๋ฌธ์„œ์— ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

Estimated code review effort: 2 (Simple) | ~10 minutes

๐Ÿšฅ Pre-merge checks | โœ… 5
โœ… Passed checks (5 passed)
Check name Status Explanation
Description Check โœ… Passed Check skipped - CodeRabbitโ€™s high-level summary is enabled.
Title check โœ… Passed ์ œ๋ชฉ์ด ๋น„ ASCII ๋ฌธ์ž๋ฅผ ํ†ตํ•œ hmac.compare_digest DoS ์ทจ์•ฝ์  ์ˆ˜์ •์ด๋ผ๋Š” ํ•ต์‹ฌ ๋ณ€๊ฒฝ์„ ์ •ํ™•ํžˆ ์š”์•ฝํ•ฉ๋‹ˆ๋‹ค.
Docstring Coverage โœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check โœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check โœ… Passed Check skipped because no linked issues were found for this pull request.
โœจ Finishing Touches
๐Ÿ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
๐Ÿงช Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sentinel-hmac-dos-fix-1679098434707941554

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

Copy link
Copy Markdown
Contributor Author

Superseded by canonical PR #361, which includes the same non-ASCII comparison fix and consolidates credential access, owned result storage, retention cleanup, and failure-mode tests. Closing this duplicate.

@seonghobae seonghobae closed this Aug 7, 2026
@google-labs-jules

Copy link
Copy Markdown

Superseded by canonical PR #361, which includes the same non-ASCII comparison fix and consolidates credential access, owned result storage, retention cleanup, and failure-mode tests. Closing this duplicate.

Understood. Acknowledging that this work is now obsolete and stopping work on this task.

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