Skip to content

security: bound interactive binary choices to 1 or 2 - #249

Open
seonghobae wants to merge 13 commits into
masterfrom
sentinel-integer-overflow-fix-15093993624234078536
Open

security: bound interactive binary choices to 1 or 2#249
seonghobae wants to merge 13 commits into
masterfrom
sentinel-integer-overflow-fix-15093993624234078536

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Problem

Three interactive readline() paths accepted any digit string with ^[0-9]+$ and then called as.integer(). Inputs outside R's integer range can become NA_integer_; the downstream condition then aborts instead of treating the input as invalid.

Change

  • Restrict common-item, old-form prior, and new-form prior confirmations to the documented 1 or 2 choices with ^[12]$.
  • Preserve the existing three-attempt limit and non-interactive fail-closed behavior.
  • Add pre-existing namespace bindings for interactive() and readline() so testthat can replace base functions inside the locked package namespace without changing normal function lookup.
  • Require testthat 3.2.0, where local_mocked_bindings() is stable.
  • Exercise all three real prompt paths, including oversized input and unsupported values, rather than testing the source text.
  • Keep a focused Sentinel journal entry describing the failure mode and prevention rule.

Scope

Only R/aFIPC.R, the deterministic test binding, test dependency floor, focused tests, and the Sentinel note are changed. Earlier unrelated .Rbuildignore, Bolt, and Palette churn was removed.

Merge contract

Merge only after the exact current head passes R CMD check, code quality, security scans, central coverage evidence, all review threads, and independent review. No passing result is claimed before those checks finish.

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

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 111 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: 12129467-c4f6-4c5d-a04b-a8e869215847

📥 Commits

Reviewing files that changed from the base of the PR and between 35e4498 and 32d3391.

📒 Files selected for processing (5)
  • .jules/sentinel.md
  • DESCRIPTION
  • R/aFIPC.R
  • R/mock-bindings.R
  • tests/testthat/test-sentinel-input-validation.R
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sentinel-integer-overflow-fix-15093993624234078536

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.

Copy link
Copy Markdown
Collaborator Author

현재 HEAD는 제목·본문과 달리 R/aFIPC.R 변경을 포함하지 않습니다. 첫 커밋에는 세 readline() 경로를 ^[12]$로 제한하는 실제 수정이 있었지만, 후속 lint/정리 커밋에서 해당 런타임 변경이 되돌아가고 .jules/* 재포맷과 .Rbuildignore 변경만 남았습니다. 병합하면 취약점이 해결되지 않으므로, 브랜치를 실제 보안 수정 커밋으로 되돌린 뒤 회귀 테스트를 추가하여 같은 HEAD에서 다시 검증합니다.

@seonghobae
seonghobae force-pushed the sentinel-integer-overflow-fix-15093993624234078536 branch from d288682 to 45d29dc Compare August 14, 2026 08:04
@seonghobae seonghobae changed the title 🛡️ Sentinel: [CRITICAL] 정수 오버플로우 DoS 취약점 수정 security: bound interactive binary choices to 1 or 2 Aug 14, 2026
@seonghobae
seonghobae enabled auto-merge (squash) August 14, 2026 08:05
@google-labs-jules

Copy link
Copy Markdown

현재 HEAD는 제목·본문과 달리 R/aFIPC.R 변경을 포함하지 않습니다. 첫 커밋에는 세 readline() 경로를 ^[12]$로 제한하는 실제 수정이 있었지만, 후속 lint/정리 커밋에서 해당 런타임 변경이 되돌아가고 .jules/* 재포맷과 .Rbuildignore 변경만 남았습니다. 병합하면 취약점이 해결되지 않으므로, 브랜치를 실제 보안 수정 커밋으로 되돌린 뒤 회귀 테스트를 추가하여 같은 HEAD에서 다시 검증합니다.

네, 지적하신 사항을 수정했습니다. PR 브랜치의 HEAD에서 R/aFIPC.Rreadline() 입력 검증을 ^[12]$로 제한하는 보안 수정 커밋을 복구하였습니다. 또한, 해당 변경 사항이 제대로 동작하고 향후 회귀(regression)를 방지하기 위해 test-sentinel-input-validation.R 테스트를 추가하고 로컬에서 성공적으로 검증했습니다.

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