Skip to content

πŸ›‘οΈ Sentinel: [MEDIUM] Fix Information Disclosure via Unvalidated Inputs - #103

Open
seonghobae wants to merge 1 commit into
masterfrom
sentinel-input-validation-389125538685557594
Open

πŸ›‘οΈ Sentinel: [MEDIUM] Fix Information Disclosure via Unvalidated Inputs#103
seonghobae wants to merge 1 commit into
masterfrom
sentinel-input-validation-389125538685557594

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

🚨 Severity: MEDIUM
πŸ’‘ Vulnerability: Publicly exported functions icci() and vuongtest() did not validate user inputs (conf.level, nested, adj). Invalid inputs like NA or incorrect types bypassed top-level safeguards, triggering raw R errors deep inside the codebase (e.g., missing value where TRUE/FALSE needed inside if(nested)).
🎯 Impact: These deep internal errors exposed the execution stack and internal state details to users, which is a form of information disclosure.
πŸ”§ Fix: Added strict type, length, and bounds validation for conf.level, nested, and adj at the very beginning of the functions, using stop(..., call. = FALSE) to fail securely without exposing internal context.
βœ… Verification: Ran R CMD INSTALL . and verified that providing invalid arguments to icci() and vuongtest() now immediately yields a safe error message without a stack trace. Tests pass successfully.


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


Open in Devin Review

Summary by CodeRabbit

  • 버그 μˆ˜μ •

    • icci()의 μ‹ λ’°μˆ˜μ€€ μž…λ ₯값이 단일 숫자이며 유효 λ²”μœ„μΈμ§€ κ²€μ¦ν•©λ‹ˆλ‹€.
    • vuongtest()의 nested 및 adj μž…λ ₯값을 κ²€μ¦ν•˜κ³ , 잘λͺ»λœ κ°’μ—λŠ” λͺ…ν™•ν•œ 였λ₯˜λ₯Ό ν‘œμ‹œν•©λ‹ˆλ‹€.
    • μœ νš¨ν•˜μ§€ μ•Šμ€ μž…λ ₯으둜 μΈν•œ 예기치 μ•Šμ€ 정보 λ…ΈμΆœ κ°€λŠ₯성을 μ€„μ˜€μŠ΅λ‹ˆλ‹€.
  • λ¬Έμ„œ

    • μž…λ ₯κ°’ 검증 및 μ•ˆμ „ν•œ 였λ₯˜ 처리 지침을 μΆ”κ°€ν–ˆμŠ΅λ‹ˆλ‹€.

Added input validation in `icci()` and `vuongtest()` to ensure parameters like `conf.level`, `nested`, and `adj` are properly checked before use. This prevents internal execution errors from leaking to users due to unhandled exceptions when passing invalid inputs.
@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 26, 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: 383a887f-375f-441a-8d09-6a61fd4bc7f7

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 807e940 and 09df4d1.

πŸ“’ Files selected for processing (3)
  • .jules/sentinel.md
  • R/icci.R
  • R/vuongtest.R

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


πŸ“ Walkthrough

Walkthrough

icci()와 vuongtest()κ°€ 곡개 ν•¨μˆ˜ 초기 λ‹¨κ³„μ—μ„œ μž…λ ₯값을 κ²€μ¦ν•©λ‹ˆλ‹€. 잘λͺ»λœ μž…λ ₯은 λͺ…μ‹œμ  였λ₯˜λ‘œ μ²˜λ¦¬ν•©λ‹ˆλ‹€. κ΄€λ ¨ 취약점과 μ˜ˆλ°©μ±…μ„ .jules/sentinel.md에 κΈ°λ‘ν–ˆμŠ΅λ‹ˆλ‹€.

Changes

곡개 ν•¨μˆ˜ μž…λ ₯ 검증

Layer / File(s) Summary
곡개 ν•¨μˆ˜ μž…λ ₯ 검증
.jules/sentinel.md, R/icci.R, R/vuongtest.R
icci()λŠ” conf.level의 νƒ€μž…, 길이, κ²°μΈ‘κ°’, λ²”μœ„λ₯Ό κ²€μ¦ν•©λ‹ˆλ‹€. vuongtest()λŠ” nested와 adj의 νƒ€μž…, 길이, κ²°μΈ‘κ°’, ν—ˆμš©κ°’μ„ κ²€μ¦ν•©λ‹ˆλ‹€. κ΄€λ ¨ 였λ₯˜ 처리 지침을 κΈ°λ‘ν•©λ‹ˆλ‹€.

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

Merge Risk: βšͺ Minimal Β· up to 09df4

The PR adds localized validation for exported function inputs and reports safe failures with passing checks; no actionable merge-blocking risk remains beyond normal review.

πŸš₯ 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 제λͺ©μ€ 곡개 ν•¨μˆ˜μ˜ κ²€μ¦λ˜μ§€ μ•Šμ€ μž…λ ₯으둜 λ°œμƒν•˜λŠ” 정보 λ…ΈμΆœ 문제λ₯Ό μˆ˜μ •ν•œλ‹€λŠ” μ£Όμš” λ³€κ²½ 사항을 μ •ν™•ν•˜κ²Œ μš”μ•½ν•©λ‹ˆλ‹€. 제λͺ©μ€ ꡬ체적이고 κ°„κ²°ν•©λ‹ˆλ‹€.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)

✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sentinel-input-validation-389125538685557594

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 R/vuongtest.R
Comment on lines +103 to +104
if (length(adj) != 1 || !is.character(adj) || is.na(adj) || !(adj %in% c("none", "aic", "bic"))) {
stop('adj must be a single character string: "none", "aic", or "bic".', call. = FALSE)

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: adj now validated even when nested=TRUE

Docs state adj is ignored when nested=TRUE, but the new check at vuongtest.R rejects invalid adj regardless of nested. A call like vuongtest(m1, m2, nested=TRUE, adj=<junk>) that previously ran now errors. Likely intended, noted for awareness.

Open in Devin Review

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

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