π‘οΈ Sentinel: [MEDIUM] Fix Information Disclosure via Unvalidated Arguments - #99
π‘οΈ Sentinel: [MEDIUM] Fix Information Disclosure via Unvalidated Arguments#99seonghobae wants to merge 1 commit into
Conversation
β¦ments Added strict type, length, and bounds validation at the very beginning of the exported functions (vuongtest, icci) to fail securely with `call. = FALSE`.
|
π 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Warning Review limit reached
Next review available in: 48 minutes Limit details: Youβve used the included review currently available. 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?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review detailsβοΈ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: π Files selected for processing (3)
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. Comment |
| if (!is.logical(nested) || length(nested) != 1 || is.na(nested)) { | ||
| stop("Argument 'nested' must be a single logical value (TRUE/FALSE)", call. = FALSE) | ||
| } | ||
| if (!is.character(adj) || length(adj) != 1 || is.na(adj) || !(adj %in% c("none", "aic", "bic"))) { | ||
| stop("Argument 'adj' must be one of 'none', 'aic', or 'bic'", call. = FALSE) | ||
| } |
There was a problem hiding this comment.
π Info: Validation order correctly guards is.na
In icci (icci.R:68) and vuongtest (vuongtest.R:101-104) the length check precedes is.na() via || short-circuit, so is.na() only runs on length-1 input. This avoids the vectorized-condition error the fix targets.
Was this helpful? React with π or π to provide feedback.
| if (!is.logical(nested) || length(nested) != 1 || is.na(nested)) { | ||
| stop("Argument 'nested' must be a single logical value (TRUE/FALSE)", call. = FALSE) | ||
| } |
There was a problem hiding this comment.
π¨ Severity: MEDIUM
π‘ Vulnerability: Unvalidated arguments (
nested,adjinvuongtest,conf.levelinicci) passed to exported functions could trigger raw R errors deep inside internal logic (e.g.,the condition has length > 1,missing value where TRUE/FALSE needed). This leaks internal execution contexts and stack traces.π― Impact: Potential information disclosure by leaking internal logic details and stack traces when invalid inputs evaluate in native control flow functions (like
if), bypassing top-levelstop(..., call. = FALSE)safeguards.π§ Fix: Added strict type, length, and bounds validation at the very beginning of the exported functions to fail securely with
call. = FALSE.β Verification: Run
testthat::test_dir('tests/testthat')to ensure all tests pass.PR created automatically by Jules for task 8994535866786174131 started by @seonghobae