Skip to content

๐Ÿ›ก๏ธ Sentinel: [MEDIUM] Fix Information Disclosure via Unvalidated Inputs - #103

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

๐Ÿ›ก๏ธ 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.

Copy link
Copy Markdown
Collaborator Author

Verified successor closure into canonical #126 exact 5a4be4cc5e231dc14155b611b4396ec631d5083a. This PR's valid product delta is the same early scalar/type/missingness/domain admission for conf.level, nested, and adj with controlled call.=FALSE errors; the third changed path is generated branch-local .jules/sentinel.md. #126 retains the validation boundary and strengthens it with persistent exported-boundary regressions for zero-length/non-scalar/NA/NaN/infinite/wrong-type/boundary inputs and exact no-call error behavior. The generated Sentinel doctrine is intentionally not inherited as repository authority. No stale checks/reviews transfer. Closing only under complete valid semantic/contract succession; #126 remains Draft.

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

Copy link
Copy Markdown

Verified successor closure into canonical #126 exact 5a4be4cc5e231dc14155b611b4396ec631d5083a. This PR's valid product delta is the same early scalar/type/missingness/domain admission for conf.level, nested, and adj with controlled call.=FALSE errors; the third changed path is generated branch-local .jules/sentinel.md. #126 retains the validation boundary and strengthens it with persistent exported-boundary regressions for zero-length/non-scalar/NA/NaN/infinite/wrong-type/boundary inputs and exact no-call error behavior. The generated Sentinel doctrine is intentionally not inherited as repository authority. No stale checks/reviews transfer. Closing only under complete valid semantic/contract succession; #126 remains Draft.

Understood. Acknowledging that this work is now obsolete and superseded by #126, stopping work on this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug priority: medium Normal-priority or P2 work type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant