π‘οΈ Sentinel: [MEDIUM] Fix Information Disclosure via Unvalidated Inputs - #103
π‘οΈ Sentinel: [MEDIUM] Fix Information Disclosure via Unvalidated Inputs#103seonghobae wants to merge 1 commit into
Conversation
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.
|
π 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. |
|
No actionable comments were generated in the recent review. π βΉοΈ Recent review infoβοΈ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: π Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. π WalkthroughWalkthrough
Changesκ³΅κ° ν¨μ μ λ ₯ κ²μ¦
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: βͺ Minimal Β· up to 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)
Full details: Docstring CoverageExplanation 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)
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 (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) |
There was a problem hiding this comment.
π 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.
Was this helpful? React with π or π to provide feedback.
π¨ Severity: MEDIUM
π‘ Vulnerability: Publicly exported functions
icci()andvuongtest()did not validate user inputs (conf.level,nested,adj). Invalid inputs likeNAor incorrect types bypassed top-level safeguards, triggering raw R errors deep inside the codebase (e.g.,missing value where TRUE/FALSE neededinsideif(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, andadjat the very beginning of the functions, usingstop(..., call. = FALSE)to fail securely without exposing internal context.β Verification: Ran
R CMD INSTALL .and verified that providing invalid arguments toicci()andvuongtest()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
Summary by CodeRabbit
λ²κ·Έ μμ
icci()μ μ λ’°μμ€ μ λ ₯κ°μ΄ λ¨μΌ μ«μμ΄λ©° μ ν¨ λ²μμΈμ§ κ²μ¦ν©λλ€.vuongtest()μnestedλ°adjμ λ ₯κ°μ κ²μ¦νκ³ , μλͺ»λ κ°μλ λͺ νν μ€λ₯λ₯Ό νμν©λλ€.λ¬Έμ