Skip to content

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

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

๐Ÿ›ก๏ธ Sentinel: [MEDIUM] Fix Information Disclosure via Unvalidated Arguments#99
seonghobae wants to merge 1 commit into
masterfrom
sentinel-input-validation-8994535866786174131

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

๐Ÿšจ Severity: MEDIUM
๐Ÿ’ก Vulnerability: Unvalidated arguments (nested, adj in vuongtest, conf.level in icci) 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-level stop(..., 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


Open in Devin Review

โ€ฆments

Added strict type, length, and bounds validation at the very beginning of the exported functions (vuongtest, icci) to fail securely with `call. = FALSE`.
@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 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

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 @coderabbitai review or push new commits to the PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 96bfe511-75e0-4502-9f0e-d274c6921724

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 807e940 and 76ec1f5.

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

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 2 potential issues.

Open in Devin Review

Comment thread R/vuongtest.R
Comment on lines +101 to +106
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)
}

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: 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.

Open in Devin Review

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

Comment thread R/vuongtest.R
Comment on lines +101 to +103
if (!is.logical(nested) || length(nested) != 1 || is.na(nested)) {
stop("Argument 'nested' must be a single logical value (TRUE/FALSE)", 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: nested rejects numeric 0/1 input

is.logical(nested) (vuongtest.R:101) now rejects numeric flags that if(nested) previously accepted. No in-repo caller passes numeric, but external callers relying on numeric would now error.

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. This PR changes only .jules/sentinel.md, R/icci.R, and R/vuongtest.R; its valid product delta is early scalar/type/missingness/domain admission for conf.level, nested, and adj with call.=FALSE. #126 exact 5a4be4cc5e231dc14155b611b4396ec631d5083a preserves that behavior, strengthens executable coverage across zero-length/non-scalar/NA/NaN/infinite/wrong-type/boundary inputs, and verifies stable error messages plus conditionCall()==NULL. The generated branch-local Sentinel doctrine is intentionally not inherited because it is not protected repository authority. No old checks/reviews transfer. Closing only under complete valid semantic/test/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. This PR changes only .jules/sentinel.md, R/icci.R, and R/vuongtest.R; its valid product delta is early scalar/type/missingness/domain admission for conf.level, nested, and adj with call.=FALSE. #126 exact 5a4be4cc5e231dc14155b611b4396ec631d5083a preserves that behavior, strengthens executable coverage across zero-length/non-scalar/NA/NaN/infinite/wrong-type/boundary inputs, and verifies stable error messages plus conditionCall()==NULL. The generated branch-local Sentinel doctrine is intentionally not inherited because it is not protected repository authority. No old checks/reviews transfer. Closing only under complete valid semantic/test/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