Skip to content

๐Ÿ›ก๏ธ Sentinel: [HIGH] hmac.compare_digest() ๋น„-ASCII ๋ฌธ์ž์—ด ๋น„๊ต ์˜ค๋ฅ˜๋กœ ์ธํ•œ ์ž ์žฌ์  DoS ์ทจ์•ฝ์  ์ˆ˜์ • - #390

Closed
seonghobae wants to merge 5 commits into
mainfrom
sentinel/fix-hmac-non-ascii-dos-10056611304526299262
Closed

๐Ÿ›ก๏ธ Sentinel: [HIGH] hmac.compare_digest() ๋น„-ASCII ๋ฌธ์ž์—ด ๋น„๊ต ์˜ค๋ฅ˜๋กœ ์ธํ•œ ์ž ์žฌ์  DoS ์ทจ์•ฝ์  ์ˆ˜์ •#390
seonghobae wants to merge 5 commits into
mainfrom
sentinel/fix-hmac-non-ascii-dos-10056611304526299262

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

๐Ÿšจ ์‹ฌ๊ฐ๋„: HIGH
๐Ÿ’ก ์ทจ์•ฝ์ : saas_web.py์˜ require_api_key ๋ฏธ๋“ค์›จ์–ด์—์„œ API ํ‚ค๋ฅผ ๊ฒ€์ฆํ•  ๋•Œ hmac.compare_digest()๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ด ํ•จ์ˆ˜๋Š” ๋น„-ASCII ๋ฌธ์ž์—ด์ด ํฌํ•จ๋œ ๋ฌธ์ž์—ด์„ ๋น„๊ตํ•  ๋•Œ TypeError๋ฅผ ๋ฐœ์ƒ์‹œํ‚ต๋‹ˆ๋‹ค. ๊ณต๊ฒฉ์ž๊ฐ€ ์•…์˜์ ์œผ๋กœ x-api-key ํ—ค๋”์— ํ•œ๊ธ€ ๋“ฑ ๋น„-ASCII ๋ฌธ์ž๋ฅผ ์ „์†กํ•˜๋ฉด 500 ์„œ๋ฒ„ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.
๐ŸŽฏ ์˜ํ–ฅ: ์ฒ˜๋ฆฌ๋˜์ง€ ์•Š์€ ์˜ˆ์™ธ ๋ฐœ์ƒ์œผ๋กœ ์ธํ•œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ถฉ๋Œ ๋ฐ ์„œ๋น„์Šค ๊ฑฐ๋ถ€(DoS) ๊ณต๊ฒฉ์— ์•…์šฉ๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๐Ÿ”ง ์ˆ˜์ •: hmac.compare_digest()์— ์ธ์ž๋ฅผ ์ „๋‹ฌํ•˜๊ธฐ ์ „์— ๋‘ ๊ฐ’์„ ๋ชจ๋‘ .encode('utf-8')๋กœ ๋ฐ”์ดํŠธ(bytes) ํ˜•ํƒœ๋กœ ๋ณ€ํ™˜ํ•˜์—ฌ ๋น„๊ตํ•˜๋„๋ก ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
โœ… ํ™•์ธ: Starlette Request ๊ฐ์ฒด๋ฅผ ์ง์ ‘ ๋ชจํ‚นํ•˜์—ฌ ๋น„-ASCII ํ—ค๋”๊ฐ€ ํฌํ•จ๋œ ์š”์ฒญ์„ require_api_key ๋ฏธ๋“ค์›จ์–ด์— ์ „๋‹ฌํ•˜๋Š” ๋‹จ์œ„ ํ…Œ์ŠคํŠธ๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  ํ†ต๊ณผํ•จ์„ ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค.


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

โ€ฆ DoS ์ทจ์•ฝ์  ์ˆ˜์ •

`saas_web.py`์˜ `require_api_key` ๋ฏธ๋“ค์›จ์–ด์—์„œ `hmac.compare_digest()` ์‚ฌ์šฉ ์‹œ ๋น„-ASCII ๋ฌธ์ž์—ด์— ๋Œ€ํ•œ ์ธ์ฝ”๋”ฉ ์ฒ˜๋ฆฌ๋ฅผ ์ถ”๊ฐ€ํ•˜์—ฌ 500 ์„œ๋ฒ„ ์˜ค๋ฅ˜ ๋ฐœ์ƒ ์ทจ์•ฝ์ ์„ ์ˆ˜์ •ํ•จ.
@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 10, 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: 38 minutes

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?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
โš™๏ธ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 87a961df-bca9-4c9c-83f2-0551be7c04f1

๐Ÿ“ฅ Commits

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

โ›” Files ignored due to path filters (3)
  • docs/papers/2212.04356-whisper.pdf is excluded by !**/*.pdf
  • docs/standards/NIST.FIPS.180-4.pdf is excluded by !**/*.pdf
  • rust-core/Cargo.lock is excluded by !**/*.lock
๐Ÿ“’ Files selected for processing (25)
  • .coveragerc
  • .github/workflows/ci.yml
  • .gitignore
  • .jules/sentinel.md
  • CHANGELOG.md
  • README.md
  • audio_library.py
  • docs/architecture/gpu-transcription-rust-backend.md
  • docs/architecture/segmentation-reconciliation.md
  • pyproject.toml
  • requirements-macos-mlx-lock.txt
  • rust-core/Cargo.toml
  • rust-core/src/lib.rs
  • rust-core/src/main.rs
  • rust-toolchain.toml
  • saas_web.py
  • scripts/benchmark_segmentation.py
  • scripts/bootstrap_macos_gpu_runtime.sh
  • tests/test_audio_library.py
  • tests/test_chapters.py
  • tests/test_ci_workflow.py
  • tests/test_macos_gpu_bootstrap.py
  • tests/test_mcp_driver.py
  • tests/test_media_shrinker.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.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head c588de01a438d2526c37d9a7f3afa812d63fe88d.

  • Head SHA: c588de01a438d2526c37d9a7f3afa812d63fe88d

  • Workflow run: 31381278538

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (2 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (2 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Test: test_saas_web.py"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_saas_web.py"]
  R2 --> V2["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 9fd8b6d2156459399641dac48509acc4e015b9e1
  • Workflow run: 31844134455
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 9fd8b6d2156459399641dac48509acc4e015b9e1.

  • Head SHA: 9fd8b6d2156459399641dac48509acc4e015b9e1

  • Workflow run: 31844134455

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (16 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (16 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Workflow: ci.yml"]
  S2 --> I2["GitHub Actions review job"]
  I2 --> R2["Review risk: Workflow: ci.yml"]
  R2 --> V2["actionlint plus required checks"]
  Evidence --> S3["Docs (4 files)"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs (4 files)"]
  R3 --> V3["docs review"]
  Evidence --> S4["Test (7 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test (7 files)"]
  R4 --> V4["targeted test run"]
Loading

seonghobae and others added 3 commits August 14, 2026 19:02
`saas_web.py`์˜ `require_api_key` ๋ฏธ๋“ค์›จ์–ด์—์„œ API ํ‚ค๊ฐ€ ๊ตฌ์„ฑ๋˜์ง€ ์•Š์€ ๊ฒฝ์šฐ ๋ชจ๋“  ์š”์ฒญ์„ ํ—ˆ์šฉํ•˜๋Š” ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด, ํ‚ค๊ฐ€ ์—†์„ ๋•Œ ๊ธฐ๋ณธ์ ์œผ๋กœ 401 Unauthorized๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋„๋ก ์ˆ˜์ •ํ•จ. ๊ด€๋ จ๋œ ํ…Œ์ŠคํŠธ ํŒŒ์ผ๋„ ์—…๋ฐ์ดํŠธํ•จ.
`saas_web.py`์˜ `require_api_key` ๋ฏธ๋“ค์›จ์–ด์—์„œ API ํ‚ค๊ฐ€ ๊ตฌ์„ฑ๋˜์ง€ ์•Š์€ ๊ฒฝ์šฐ ๋ชจ๋“  ์š”์ฒญ์„ ํ—ˆ์šฉํ•˜๋Š” ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด, ํ‚ค๊ฐ€ ์—†์„ ๋•Œ ๊ธฐ๋ณธ์ ์œผ๋กœ 401 Unauthorized๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋„๋ก ์ˆ˜์ •ํ•จ. ๋˜ํ•œ `hmac.compare_digest`์— ๋Œ€ํ•œ ๋น„-ASCII ๋ฌธ์ž ์ง€์›(500 ์—๋Ÿฌ ๋ฐฉ์ง€)์„ ์œ„ํ•ด ๋ฌธ์ž์—ด์„ utf-8๋กœ ์ธ์ฝ”๋”ฉํ•˜๋„๋ก ๋ณ€๊ฒฝํ•˜๊ณ  ๊ด€๋ จ๋œ ํ…Œ์ŠคํŠธ ํŒŒ์ผ์„ ์—…๋ฐ์ดํŠธํ•จ.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 9fd8b6d2156459399641dac48509acc4e015b9e1.

  • Head SHA: 9fd8b6d2156459399641dac48509acc4e015b9e1

  • Workflow run: 31844134455

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (16 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (16 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Workflow: ci.yml"]
  S2 --> I2["GitHub Actions review job"]
  I2 --> R2["Review risk: Workflow: ci.yml"]
  R2 --> V2["actionlint plus required checks"]
  Evidence --> S3["Docs (4 files)"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs (4 files)"]
  R3 --> V3["docs review"]
  Evidence --> S4["Test (7 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test (7 files)"]
  R4 --> V4["targeted test run"]
Loading

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate and unsafe predecessor of #376. Both target the same non-ASCII hmac.compare_digest() failure, while #376 carries the reviewed registry-backed, byte-oriented fix on current main with focused authentication regressions. This branch additionally contains 28 changed paths and 29,604 deletions unrelated to the vulnerability, so none of its stale check or review evidence is transferable.

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

Copy link
Copy Markdown

Closing as a duplicate and unsafe predecessor of #376. Both target the same non-ASCII hmac.compare_digest() failure, while #376 carries the reviewed registry-backed, byte-oriented fix on current main with focused authentication regressions. This branch additionally contains 28 changed paths and 29,604 deletions unrelated to the vulnerability, so none of its stale check or review evidence is transferable.

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