π‘οΈ Sentinel: [MEDIUM] Fix integer overflow coercion in readline validation - #294
π‘οΈ Sentinel: [MEDIUM] Fix integer overflow coercion in readline validation#294seonghobae wants to merge 1 commit into
Conversation
`R/aFIPC.R` λ΄μ λνν `readline()` μ«μ μ λ ₯μμ μ μ μ€λ²νλ‘μ°λ‘ μΈν΄ νμ μ€λ₯κ° λ°μν μ μλ μ·¨μ½μ μ ν΄κ²°νμ΅λλ€. κΈ°μ‘΄ 무μ ν μ«μ λ§€μΉ(`^[0-9]+$`)μ νΉμ μμ κ° λ§€μΉ(`^[12]$`)μΌλ‘ λ³κ²½νμμ΅λλ€. μμ μ¬ν κ²μ¦μ μν΄ `mockery`λ₯Ό μ¬μ©ν ν μ€νΈλ₯Ό μΆκ°νκ³ `.jules/sentinel.md`μ λ΄μ©μ κΈ°λ‘νμ΅λλ€.
|
π 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 reachedNext included review available in 8 minutes. View limit detailsLimit 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. Review configuration: βοΈ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: π Files selected for processing (5)
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 |
| prompt = "Do you want to use default BILOG-MG priors for oldform Data? (1: Yes 2: No) : " | ||
| ) | ||
| if (grepl("^[0-9]+$", n)) { | ||
| if (grepl("^[12]$", n)) { |
There was a problem hiding this comment.
π Info: Tightened regex also rejects other digits at BILOG prompts
At R/aFIPC.R:174 and R/aFIPC.R:393, inputs other than 1/2 previously returned the number and were treated as No via the else branch. They now exhaust the three attempts and error. This changes behavior for out-of-range interactive input, not just overflow values.
Was this helpful? React with π or π to provide feedback.
π¨ Severity: MEDIUM
π‘ Vulnerability:
readline()μμ μ λ ₯κ°μ κ²μ¦ν λ μ ν μλ μ«μ μ κ·μμ μ¬μ©νμ¬ κ·Ήλ¨μ μΌλ‘ ν° κ°μ μ λ ₯νλ©΄as.integer()μμNAλ₯Ό λ°νν΄ νλ‘μΈμ€ μΆ©λ(μ μ μ€λ²νλ‘μ° κ°μ λ³ν)μ΄ λ°μν©λλ€.π― Impact: μλͺ»λ νμ μ²λ¦¬λ₯Ό ν΅ν΄ λ°νμ μ€λ₯κ° λ°μνμ¬ μ€νμ΄ μ€λ¨λ μ μμ΅λλ€.
π§ Fix: μ κ·μμ
^[0-9]+$μμ^[12]$λ‘ λ³κ²½νμ¬ μμλ κ°λ§ μ격ν ν΅κ³Όνλλ‘ μμ νμ΅λλ€. κ΄λ ¨ λ΄μ© ν μ€νΈ μ½λλ₯Όtest-sentinel-validation.Rμ μΆκ°νμ¬ κ²μ¦μ μλ£νμμ΅λλ€.β Verification:
AFIPC_ENABLE_PACKRAT=true Rscript -e "testthat::test_dir('tests/testthat')"λ₯Ό ν΅ν΄ λͺ¨λ ν μ€νΈ ν΅κ³Ό νμΈ.PR created automatically by Jules for task 12758367261507381913 started by @seonghobae