Skip to content

๐Ÿ›ก๏ธ Sentinel: [MEDIUM] Fix Integer Coercion Vulnerability - #176

Open
seonghobae wants to merge 4 commits into
masterfrom
sentinel/fix-integer-coercion-vuln-15724802833890598210
Open

๐Ÿ›ก๏ธ Sentinel: [MEDIUM] Fix Integer Coercion Vulnerability#176
seonghobae wants to merge 4 commits into
masterfrom
sentinel/fix-integer-coercion-vuln-15724802833890598210

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

๐Ÿšจ Severity: MEDIUM
๐Ÿ’ก Vulnerability: Unbounded input via readline() coerced with as.integer() when checked against ^[0-9]+$. If a very large number is provided, as.integer() yields NA, which leads to runtime errors or unhandled exceptions when passing lengths > 1 to conditional logic. This is an unexpected behavior/coercion bug that can be exploited for application DoS.
๐ŸŽฏ Impact: Potential application crash/Denial of Service when automating or improperly interacting with prompts.
๐Ÿ”ง Fix: Changed the weak match ^[0-9]+$ to exact-bounded selection bounds ^[12]$ ensuring safety of as.integer() coercion.
โœ… Verification: Ran Rscript -e 'devtools::test()' and coverage tools. Tests passed and coverage is maintained. Recorded critical learning in .jules/sentinel.md.


PR created automatically by Jules for task 15724802833890598210 started by @seonghobae

Summary by CodeRabbit

  • New Features
    • ๊ณ ์ • ํ•ญ๋ชฉ ๋งค๊ฐœ๋ณ€์ˆ˜ ๋ณด์ • ์ž๋™ํ™” ๊ธฐ๋Šฅ(autoFIPC)๊ณผ ์‹คํŒจ ์‹œ ๋Œ€์ฒด ๋ณด์ • ๊ธฐ๋Šฅ(surveyFA)์„ ๊ณต๊ฐœํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ๋ฒ„๊ทธ ์ˆ˜์ •
    • ๋Œ€ํ™”ํ˜• ์ž…๋ ฅ ๋ฐ ์ •์ˆ˜/์„ ํƒ์ง€ ๊ฒ€์ฆ์„ ๋” ์—„๊ฒฉํ•œ ํ˜•์‹๊ณผ ํ—ˆ์šฉ ๋ฒ”์œ„๋กœ ์ œํ•œํ•ด ์ž˜๋ชป๋œ ์ž…๋ ฅ์— ๋”ฐ๋ฅธ ์˜ˆ์™ธ ๊ฐ€๋Šฅ์„ฑ์„ ์ค„์˜€์Šต๋‹ˆ๋‹ค.
  • ๋ฌธ์„œ
    • ํŒจํ‚ค์ง€ ๋ฌธ์„œ, ๋งค๋‰ด์–ผ, ์›น ์ธ๋ฑ์Šค/์Šคํƒ€์ผ์„ ๋ณด๊ฐ•ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • Tests
    • ๋ณด์•ˆ(์ž…๋ ฅ ์„ผํ‹ฐ๋„ฌ) ๋ฐ ์บ˜๋ฆฌ๋ธŒ๋ ˆ์ด์…˜/๋™๋“ฑ์„ฑ/์˜ˆ์™ธ ํ๋ฆ„์— ๋Œ€ํ•œ ํ…Œ์ŠคํŠธ๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • ์ฒญ์†Œ(Chores)
    • ๋นŒ๋“œ/ํŒจํ‚ค์ง•์—์„œ ์ œ์™ธ ๊ทœ์น™์„ ๊ฐฑ์‹ ํ–ˆ์Šต๋‹ˆ๋‹ค.

Fixed weak regex validation for integer conversion via readline() in R/aFIPC.R to prevent DoS or crashes via as.integer() type coercion.
@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.

Copilot AI review requested due to automatic review settings July 26, 2026 16:18
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 2 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
โš™๏ธ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c7d03739-1e88-4307-a3b2-2d2a545a0c3a

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between fbb5113 and c205182.

๐Ÿ“’ Files selected for processing (1)
  • .gitignore
๐Ÿ“ Walkthrough

Walkthrough

autoFIPC์™€ surveyFA๋ฅผ ํŒจํ‚ค์ง€ API๋กœ ์ถ”๊ฐ€ํ•˜๊ณ , ์–‘์‹๋ณ„ ์ถ”์ •ยท๊ณตํ†ต ๋ฌธํ•ญ ๋งํ‚นยท์‹คํŒจ ๋ณต๊ตฌยท๊ฒฐ๊ณผ ์‚ฐ์ถœ์„ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค. ํŒจํ‚ค์ง€ ๋ฌธ์„œ์™€ R check ์‚ฐ์ถœ๋ฌผ, ์ž…๋ ฅ ๊ฒ€์ฆ ํ…Œ์ŠคํŠธ, ๋Œ€ํ™”ํ˜• ์ž…๋ ฅ ๋ฐ ๋นŒ๋“œ ์ œ์™ธ ๊ทœ์น™๋„ ๊ฐฑ์‹ ํ–ˆ์Šต๋‹ˆ๋‹ค.

Changes

FIPC ๋ณด์ • ๊ธฐ๋Šฅ

Layer / File(s) Summary
๊ณต๊ฐœ ์ง„์ž…์ ๊ณผ ๋ณต๊ตฌ ์ถ”์ •
aFIPC.Rcheck/00_pkg_src/aFIPC/R/aFIPC.R, aFIPC.Rcheck/00_pkg_src/aFIPC/R/surveyFA.R
autoFIPC์™€ surveyFA๊ฐ€ ์ž…๋ ฅ ๊ฒ€์ฆ, ์–‘์‹๋ณ„ ๋ชจ๋ธ ์ถ”์ •, ์ถ”์ • ์‹คํŒจ ์‹œ ์žฌ์‹œ๋„์™€ bounded recovery๋ฅผ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.
IPD ํŒ์ •๊ณผ ํŒŒ๋ผ๋ฏธํ„ฐ ๋งํ‚น
aFIPC.Rcheck/00_pkg_src/aFIPC/R/aFIPC.R
IPD/DIF ๊ฒฐ๊ณผ๋ฅผ ๋ฐ˜์˜ํ•ด ๊ณตํ†ต ๋ฌธํ•ญ์„ ๊ฒฐ์ •ํ•˜๊ณ , Linked Form๊ณผ ThetaยทExpectedScore ๊ฒฐ๊ณผ๋ฅผ ๋ฐ˜ํ™˜ํ•ฉ๋‹ˆ๋‹ค.
๋ณด์ • ๋™์ž‘๊ณผ ์ž…๋ ฅ ๊ฒ€์ฆ ํ…Œ์ŠคํŠธ
aFIPC.Rcheck/00_pkg_src/aFIPC/tests/testthat/*
๊ณตํ†ต ๋ฌธํ•ญ ๊ณ ์ •, API ๋ฐ˜ํ™˜๊ฐ’, ๋ณด์•ˆ ๊ฒ€์ฆ, surveyFA ๋ณต๊ตฌ์™€ ์ตœ์ ํ™” ๋™๋“ฑ์„ฑ์„ ๊ฒ€์ฆํ•ฉ๋‹ˆ๋‹ค.

ํŒจํ‚ค์ง€ ๋ฐฐํฌ ์‚ฐ์ถœ๋ฌผ

Layer / File(s) Summary
ํŒจํ‚ค์ง€ ๊ณ„์•ฝ๊ณผ ๋ฌธ์„œ
aFIPC.Rcheck/00_pkg_src/aFIPC/{DESCRIPTION,NAMESPACE,README.md,man/*}, aFIPC.Rcheck/aFIPC/{DESCRIPTION,NAMESPACE,INDEX,LICENSE}, aFIPC.Rcheck/aFIPC/html/*
ํŒจํ‚ค์ง€ ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ์™€ export ์„ ์–ธ, ํ•จ์ˆ˜ ๋ฌธ์„œ, ๋„์›€๋ง ์ธ๋ฑ์Šค์™€ HTML ์Šคํƒ€์ผ์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
R check ์‹คํ–‰ ์‚ฐ์ถœ๋ฌผ
aFIPC.Rcheck/{R_check_bin/*,aFIPC-Ex.*,tests/*}
์˜ˆ์ œ ์‹คํ–‰, ํƒ€์ด๋ฐ ๊ธฐ๋ก, ํ…Œ์ŠคํŠธ ๋Ÿฌ๋„ˆ์™€ R check ์ถœ๋ ฅ ์‚ฐ์ถœ๋ฌผ์„ ๊ตฌ์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค.
์ƒ์„ฑ๋œ ํŒจํ‚ค์ง€ ์ธ๋ฑ์Šค์™€ ๋ฐ”์ด๋„ˆ๋ฆฌ
aFIPC.Rcheck/aFIPC/{R/*,Meta/*,help/*}
lazy-load ๋ฐ์ดํ„ฐ, RDS ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ์™€ ๋„์›€๋ง ์ธ๋ฑ์Šค๋ฅผ ์ƒ์„ฑํ–ˆ์Šต๋‹ˆ๋‹ค.

์ž…๋ ฅ ๋ฐ ๋นŒ๋“œ ๋ณด์•ˆ ๊ฐ•ํ™”

Layer / File(s) Summary
ํ™•์ธ ์ž…๋ ฅ์˜ exact-match ๊ฒ€์ฆ
R/aFIPC.R, .jules/sentinel.md, .Rbuildignore
๋Œ€ํ™”ํ˜• ์ž…๋ ฅ์„ ^[12]$๋กœ ์ œํ•œํ•˜๊ณ , ํฐ ์ •์ˆ˜์˜ NA ๊ฐ•์ œ ๋ณ€ํ™˜ ์˜ˆ๋ฐฉ ์ง€์นจ๊ณผ .semgrepignore ์ œ์™ธ ๊ทœ์น™์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant autoFIPC
  participant surveyFA
  participant mirt
  Caller->>autoFIPC: old/new ๋ฐ์ดํ„ฐ์™€ ๊ณตํ†ต ๋ฌธํ•ญ ์ „๋‹ฌ
  autoFIPC->>mirt: ์–‘์‹๋ณ„ ๋ชจ๋ธ ์ถ”์ •
  autoFIPC->>surveyFA: ์‹คํŒจ ๋ชจ๋ธ ๋ณต๊ตฌ ์š”์ฒญ
  surveyFA->>mirt: EM/QMCEM/MHRM ์žฌ์ถ”์ •
  surveyFA-->>autoFIPC: ์œ ํšจ ๋ชจ๋ธ ๋˜๋Š” ๋ณต๊ตฌ ์‹คํŒจ
Loading

Suggested reviewers: copilot

๐Ÿšฅ 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.
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.
โœจ Finishing Touches
๐Ÿงช Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sentinel/fix-integer-coercion-vuln-15724802833890598210

Comment @coderabbitai help to get the list of available commands.

Copilot AI 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.

Pull request overview

This PR tightens interactive prompt input validation inside autoFIPC() to prevent unsafe as.integer() coercion outcomes (e.g., large numeric strings becoming NA) and documents the security lesson in the Sentinel log.

Changes:

  • Restrict interactive prompt acceptance from ^[0-9]+$ to the exact allowed options ^[12]$ for common-item confirmation and BILOG prior selection.
  • Preserve existing retry/stop behavior for repeated invalid inputs.
  • Document the integer-coercion risk and prevention guidance in .jules/sentinel.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
R/aFIPC.R Hardens readline() option parsing so only 1/2 are accepted before as.integer() conversion in interactive flows.
.jules/sentinel.md Adds a Sentinel entry documenting the coercion pitfall and the bounded-regex mitigation.

๐Ÿ’ก Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

โ€ฆ issue

Fixed weak regex validation for integer conversion via readline() in R/aFIPC.R to prevent DoS or crashes via as.integer() type coercion.
Added `.semgrepignore` to `.Rbuildignore` to fix `R CMD check` CI failure regarding unrecognized hidden files.
Copilot AI review requested due to automatic review settings July 26, 2026 16:35

Copilot AI 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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

โ€ฆ issue

Fixed weak regex validation for integer conversion via readline() in R/aFIPC.R to prevent DoS or crashes via as.integer() type coercion.
Added `.semgrepignore` to `.Rbuildignore` to fix `R CMD check` CI failure regarding unrecognized hidden files.
Removed `test_dummy.R` and `test_validation.R` from the top level which were failing the check `R CMD check` due to non-standard files found.
Copilot AI review requested due to automatic review settings July 26, 2026 17:00

Copilot AI 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.

Pull request overview

Copilot reviewed 42 out of 57 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • aFIPC.Rcheck/00_pkg_src/aFIPC/man/autoFIPC.Rd: Generated file

Comment thread .jules/sentinel.md
**Learning:** In R, optional boolean parameters that default to `NULL` should be validated using explicit runtime type validation (e.g., `if (!is.null(flag) && (!is.logical(flag) || length(flag) != 1 || is.na(flag)))`).
**Prevention:** Always implement explicit runtime type validation for optional boolean parameters.

## 2024-07-26 - Integer Coercion Vulnerability from readline()

@coderabbitai coderabbitai 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.

Actionable comments posted: 11

๐Ÿงน Nitpick comments (7)
aFIPC.Rcheck/aFIPC/R/aFIPC.rdb (1)

1-1: ๐Ÿ“ Maintainability & Code Quality | ๐Ÿ”ต Trivial | โšก Quick win

์ƒ์„ฑ๋œ R CMD check ์‚ฐ์ถœ๋ฌผ์€ ์ €์žฅ์†Œ์—์„œ ์ œ์™ธํ•˜์„ธ์š”.

aFIPC.Rcheck/aFIPC/R/aFIPC.rdb๋Š” ์†Œ์Šค๊ฐ€ ์•„๋‹Œ ์ƒ์„ฑ ๋ฐ”์ด๋„ˆ๋ฆฌ์ž…๋‹ˆ๋‹ค. ๋™์ผํ•œ aFIPC.Rcheck/ ํŠธ๋ฆฌ์˜ ๋กœ๊ทธยทRDSยท๋„์›€๋ง DBยท์„ค์น˜ ํŒจํ‚ค์ง€ ์‚ฌ๋ณธ๋„ ํ•จ๊ป˜ ์ œ๊ฑฐํ•˜๊ณ , ๊ฒ€์ฆ ๊ฒฐ๊ณผ๋Š” CI ์•„ํ‹ฐํŒฉํŠธ๋กœ ๋ณด๊ด€ํ•˜์„ธ์š”. ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด ์ €์žฅ์†Œ ์šฉ๋Ÿ‰๊ณผ ๋ฆฌ๋ทฐ diff๊ฐ€ ๋ถˆํ•„์š”ํ•˜๊ฒŒ ์ปค์ง€๊ณ  ๊ฒฐ๊ณผ๋ฌผ์ด ์‰ฝ๊ฒŒ ์˜ค๋ž˜๋ฉ๋‹ˆ๋‹ค.

๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@aFIPC.Rcheck/aFIPC/R/aFIPC.rdb` at line 1, Remove the generated R CMD check
artifacts under the aFIPC.Rcheck tree, including aFIPC.rdb and any logs, RDS
files, help databases, and installed package copies; ensure the entire generated
directory is excluded from version control and retain validation results through
CI artifacts instead.
aFIPC.Rcheck/aFIPC/Meta/Rd.rds (1)

1-1: ๐Ÿ“ Maintainability & Code Quality | ๐Ÿ”ต Trivial | โšก Quick win

์ƒ์„ฑ๋œ RDS ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋ฅผ ์†Œ์Šค ์ €์žฅ์†Œ์— ์ปค๋ฐ‹ํ•˜์ง€ ๋งˆ์„ธ์š”.

aFIPC.Rcheck/aFIPC/Meta/*.rds๋Š” ํŒจํ‚ค์ง€ ๋นŒ๋“œยท์ฒดํฌ์—์„œ ์žฌ์ƒ์„ฑ๋˜๋Š” ์‚ฐ์ถœ๋ฌผ์ž…๋‹ˆ๋‹ค. ์†Œ์Šค๋‚˜ namespace๊ฐ€ ๋ณ€๊ฒฝ๋˜๋ฉด stale ์ƒํƒœ๊ฐ€ ๋˜๊ณ  ๋ฐ”์ด๋„ˆ๋ฆฌ diff๋กœ ๊ฒ€ํ† ํ•˜๊ธฐ๋„ ์–ด๋ ต์Šต๋‹ˆ๋‹ค. CI์—์„œ ์ƒ์„ฑํ•˜๋„๋ก ํ•˜๊ณ  ํ•ด๋‹น ์ฒดํฌ ์‚ฐ์ถœ๋ฌผ์„ ๋ฒ„์ „ ๊ด€๋ฆฌ์—์„œ ์ œ์™ธํ•˜์„ธ์š”.

๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@aFIPC.Rcheck/aFIPC/Meta/Rd.rds` at line 1, Remove the generated RDS metadata
artifact under aFIPC.Rcheck/aFIPC/Meta from version control and add the
corresponding aFIPC.Rcheck build/check output pattern to the repositoryโ€™s ignore
configuration so CI recreates it during package checks.
aFIPC.Rcheck/aFIPC-Ex.R (1)

33-41: ๐Ÿ“ Maintainability & Code Quality | ๐Ÿ”ต Trivial | ๐Ÿ—๏ธ Heavy lift

๊ณต๊ฐœ API ์˜ˆ์ œ๋ฅผ ์‹คํ–‰ ๊ฐ€๋Šฅํ•œ ์ตœ์†Œ ์˜ˆ์ œ๋กœ ์ œ๊ณตํ•˜์„ธ์š”.

ํ˜„์žฌ ์˜ˆ์ œ๋Š” Not run ์ƒํƒœ์ด๊ณ  ์ž…๋ ฅ ๊ฐ์ฒด๋„ ์ •์˜๋˜์–ด ์žˆ์ง€ ์•Š์•„ API ๊ณ„์•ฝ์„ ๊ฒ€์ฆํ•˜์ง€ ๋ชปํ•ฉ๋‹ˆ๋‹ค. ์ตœ์†Œํ•œ์˜ ์‹คํ–‰ ๊ฐ€๋Šฅํ•œ toy ์ž…๋ ฅ์„ ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜, ํ•„์š”ํ•œ ๋ชจ๋ธ ์ƒ์„ฑ ์ ˆ์ฐจ์™€ ์‹คํ–‰ ๋ถˆ๊ฐ€ ์‚ฌ์œ ๋ฅผ ์›๋ณธ Rd ๋ฌธ์„œ์— ๋ช…์‹œํ•œ ๋’ค ์‚ฐ์ถœ๋ฌผ์„ ์žฌ์ƒ์„ฑํ•˜์„ธ์š”.

๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@aFIPC.Rcheck/aFIPC-Ex.R` around lines 33 - 41, autoFIPC ์˜ˆ์ œ๋ฅผ ์‹คํ–‰ ๊ฐ€๋Šฅํ•œ ์ตœ์†Œ ์˜ˆ์ œ๋กœ
์ˆ˜์ •ํ•˜๊ณ , new_modelยทold_modelยทcommon_newยทcommon_old ๋“ฑ ํ•„์š”ํ•œ toy ์ž…๋ ฅ๊ณผ ๋ชจ๋ธ ์ƒ์„ฑ ์ ˆ์ฐจ๋ฅผ ํฌํ•จํ•˜์„ธ์š”.
์˜ˆ์ œ๋ฅผ ์‹ค์ œ๋กœ ์‹คํ–‰ํ•ด API ๊ณ„์•ฝ์„ ๊ฒ€์ฆํ•  ์ˆ˜ ์žˆ๋„๋ก Not run ์ƒํƒœ๋ฅผ ์ œ๊ฑฐํ•˜๊ณ  ์‚ฐ์ถœ๋ฌผ์„ ์žฌ์ƒ์„ฑํ•˜๋ฉฐ, ์‹คํ–‰์ด ๋ถˆ๊ฐ€๋Šฅํ•œ ๊ฒฝ์šฐ์—๋Š” ์›๋ณธ Rd
๋ฌธ์„œ์— ๊ทธ ์‚ฌ์œ ์™€ ํ•„์š”ํ•œ ์ ˆ์ฐจ๋ฅผ ๋ช…์‹œํ•œ ๋’ค ์žฌ์ƒ์„ฑํ•˜์„ธ์š”.
aFIPC.Rcheck/tests/testthat/test-fixed-parameter-calibration.R (1)

83-88: ๐Ÿ“ Maintainability & Code Quality | ๐Ÿ”ต Trivial | โšก Quick win

expect_false(any(...))๋Š” ๋นˆ ๋ฒกํ„ฐ์—์„œ๋„ ํ†ต๊ณผํ•˜๋ฏ€๋กœ ๊ฒ€์ฆ์ด ๋ฌด๋ ฅํ™”๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

linked_structural์ด 0-๊ธธ์ด๋ฉด any()๊ฐ€ FALSE๋ฅผ ๋ฐ˜ํ™˜ํ•ด ํ…Œ์ŠคํŠธ๊ฐ€ ํ•ญ์ƒ ํ†ต๊ณผํ•ฉ๋‹ˆ๋‹ค. ์‹ค์ œ๋กœ g/u ํ–‰์ด ์กด์žฌํ•˜๋Š”์ง€ ๋จผ์ € ๋‹จ์–ธํ•ด ์ฃผ์„ธ์š”.

๐Ÿ’š ์ œ์•ˆ ์ˆ˜์ •
+  expect_gt(length(linked_structural), 0)
   expect_false(any(linked_structural))

๊ฐ™์€ ํŒจํ„ด์ด L104(expect_false(any(linked_fixed$est)))์™€ L115์—๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@aFIPC.Rcheck/tests/testthat/test-fixed-parameter-calibration.R` around lines
83 - 88, Update the assertions around linked_structural and the corresponding
linked_fixed and L115 checks so they first assert that the filtered g/u rows
exist and are non-empty, then verify their est values are false. Ensure empty
filtered vectors fail the test instead of allowing expect_false(any(...)) to
pass.
aFIPC.Rcheck/tests/testthat/test-optimization-equivalence.R (1)

37-50: ๐Ÿ“ Maintainability & Code Quality | ๐Ÿ”ต Trivial | โšก Quick win

๊ตฌํ˜„์„ ํ˜ธ์ถœํ•˜์ง€ ์•Š๊ณ  ํ‘œํ˜„์‹์„ ๋ณต์ œํ•ด ๊ฒ€์ฆํ•˜๋ฏ€๋กœ ํšŒ๊ท€ ๊ฐ€๋“œ๋กœ ๋™์ž‘ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

new_idiom์€ autoFIPC() ๋‚ด๋ถ€ ์ฝ”๋“œ๋ฅผ ์ฐธ์กฐํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ ๋™์ผํ•œ ํ‘œํ˜„์‹์„ ํ…Œ์ŠคํŠธ ํŒŒ์ผ์— ๋‹ค์‹œ ์ ์–ด๋‘” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์‹ค์ œ ๊ตฌํ˜„(aFIPC.R L773-774)์ด ๋ฐ”๋€Œ์–ด๋„ ์ด ํ…Œ์ŠคํŠธ๋Š” ๊ณ„์† ํ†ต๊ณผํ•ฉ๋‹ˆ๋‹ค. ์นดํ…Œ๊ณ ๋ฆฌ ์ˆ˜ ๋น„๊ต ๋กœ์ง์„ ๋‚ด๋ถ€ ํ—ฌํผ๋กœ ์ถ”์ถœํ•ด ํ…Œ์ŠคํŠธ๊ฐ€ ๊ทธ ํ—ฌํผ๋ฅผ ํ˜ธ์ถœํ•˜๋„๋ก ํ•˜๋ฉด ์˜๋„ํ•œ ํšŒ๊ท€ ๋ฐฉ์ง€๊ฐ€ ์„ฑ๋ฆฝํ•ฉ๋‹ˆ๋‹ค.

๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@aFIPC.Rcheck/tests/testthat/test-optimization-equivalence.R` around lines 37
- 50, Refactor the category-count logic used by autoFIPC into a shared internal
helper, then update both the implementation and this test to call that helper
instead of duplicating length(na.omit(unique(x))). Preserve the comparison with
the legacy levels(as.factor(x)) expression and the existing expected-value
assertions.
aFIPC.Rcheck/tests/testthat/test-sentinel-validation.R (1)

1-37: ๐Ÿ“ Maintainability & Code Quality | ๐Ÿ”ต Trivial | โšก Quick win

์ด๋ฒˆ PR์˜ ํ•ต์‹ฌ ๋ณ€๊ฒฝ์ธ ^[12]$ ์ž…๋ ฅ ๊ฒ€์ฆ์— ๋Œ€ํ•œ ์ปค๋ฒ„๋ฆฌ์ง€๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.

boolean ํ”Œ๋ž˜๊ทธ ๊ฒ€์ฆ์€ ์ž˜ ๋‹ค๋ฃจ๊ณ  ์žˆ์ง€๋งŒ, ์ •์ž‘ readline() ํ™•์ธ ๊ฒฝ๋กœ(checkCorrect, checknewformBILOGprior, checkoldformBILOGprior)์˜ exact-match ๋™์ž‘๊ณผ 3ํšŒ ์ดˆ๊ณผ ์‹œ ์ค‘๋‹จ ๋™์ž‘์€ ๊ฒ€์ฆ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์ตœ์†Œํ•œ ๋น„๋Œ€ํ™”ํ˜• ์„ธ์…˜์—์„œ confirmCommonItems = NULL์ผ ๋•Œ ๋ช…ํ™•ํžˆ ์ค‘๋‹จ๋˜๋Š”์ง€, confirmCommonItems = FALSE์ผ ๋•Œ 'Please write down pairs correctly'๋กœ ์ค‘๋‹จ๋˜๋Š”์ง€๋Š” ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ œ๊ฐ€ ํ•ด๋‹น ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค๋ฅผ ์ž‘์„ฑํ•ด ๋“œ๋ฆด๊นŒ์š”?

๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@aFIPC.Rcheck/tests/testthat/test-sentinel-validation.R` around lines 1 - 37,
Add coverage for the new ^[12]$ input validation in the readline confirmation
paths, targeting checkCorrect, checknewformBILOGprior, and
checkoldformBILOGprior. Verify exact-match handling and termination after more
than three invalid attempts, including non-interactive confirmCommonItems = NULL
terminating clearly and confirmCommonItems = FALSE terminating with โ€œPlease
write down pairs correctlyโ€.
aFIPC.Rcheck/00_pkg_src/aFIPC/tests/testthat/test-autoFIPC.R (1)

1-25: ๐Ÿฉบ Stability & Availability | ๐Ÿ”ต Trivial | ๐Ÿ—๏ธ Heavy lift

PR์˜ ํ•ต์‹ฌ ๋ณด์•ˆ ์ˆ˜์ •(checkCorrect()์˜ readline ์ •๊ทœ์‹ ^[0-9]+$ โ†’ ^[12]$) ์ž์ฒด์— ๋Œ€ํ•œ ํšŒ๊ท€ ํ…Œ์ŠคํŠธ๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.

Line 1-12, 14-25์˜ ํ…Œ์ŠคํŠธ๋Š” interactive()๊ฐ€ FALSE์ผ ๋•Œ ์กฐ๊ธฐ์— ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” ๊ฒฝ๋กœ๋งŒ ๊ฒ€์ฆํ•˜๋ฉฐ, ์‹ค์ œ๋กœ readline ์ž…๋ ฅ์„ ์ •๊ทœ์‹์œผ๋กœ ๊ฒ€์ฆํ•˜๋Š” ๋กœ์ง(๋ฐ 3ํšŒ ์‹คํŒจ ์‹œ "Too many invalid common item confirmation attempts" ์ข…๋ฃŒ ๊ฒฝ๋กœ)์€ ์ „ํ˜€ ์‹คํ–‰๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. interactive()์™€ readline()์„ ํ•จ๊ป˜ ๋ชจํ‚นํ•ด ^[0-9]+$์˜€๋‹ค๋ฉด as.integer() ์˜ค๋ฒ„ํ”Œ๋กœ์šฐ๋กœ NA๊ฐ€ ๋ฐœ์ƒํ–ˆ์„ ํฐ ์ˆ˜(์˜ˆ: "999999999999")๋‚˜ "abc" ๊ฐ™์€ ์ž…๋ ฅ์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๊ฑฐ๋ถ€๋˜๋Š”์ง€ ์ง์ ‘ ๊ฒ€์ฆํ•˜๋Š” ํ…Œ์ŠคํŠธ๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฒƒ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค.

๋‹ค๋งŒ base ํ•จ์ˆ˜(interactive, readline)๋ฅผ testthat::local_mocked_bindings()๋กœ ๋ชจํ‚นํ•˜๋ ค๋ฉด ํŒจํ‚ค์ง€ ๋„ค์ž„์ŠคํŽ˜์ด์Šค์— ํ•ด๋‹น ๋ฐ”์ธ๋”ฉ(์˜ˆ: interactive <- NULL)์ด ๋ฏธ๋ฆฌ ์กด์žฌํ•ด์•ผ ํ•˜๋ฉฐ, local_mocked_bindings()๋Š” testthat 3.1.x์—์„œ ์‹คํ—˜์ ์œผ๋กœ ๋„์ž…๋˜์–ด ์ดํ›„(3.2.0) ์•ˆ์ •ํ™”๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด ํŒŒ์ผ์˜ library_context๋Š” testthat (>= 3.0.0)๋งŒ ์š”๊ตฌํ•œ๋‹ค๊ณ  ๋ช…์‹œํ•˜๋ฏ€๋กœ, CI์—์„œ ์‹ค์ œ๋กœ ์ด ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” testthat ๋ฒ„์ „์ด ์„ค์น˜๋˜๋Š”์ง€ ํ™•์ธ์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

test_that("checkCorrect rejects overflow/non-matching readline input", {
  local_mocked_bindings(
    interactive = function() TRUE,
    readline = function(...) "999999999999",
    .package = "base"
  )
  expect_error(
    aFIPC::autoFIPC(
      newformXData = data.frame(A = 1),
      oldformYData = data.frame(A = 2),
      newformCommonItemNames = c('A'),
      oldformCommonItemNames = c('A')
    ),
    "Too many invalid common item confirmation attempts"
  )
})

์ด ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š” PR์„ ๋„์™€๋“œ๋ฆด๊นŒ์š”, ์•„๋‹ˆ๋ฉด ์ด์Šˆ๋กœ ๋“ฑ๋กํ•ด ๋“œ๋ฆด๊นŒ์š”?

๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@aFIPC.Rcheck/00_pkg_src/aFIPC/tests/testthat/test-autoFIPC.R` around lines 1
- 25, Extend the tests around autoFIPC to exercise checkCorrectโ€™s interactive
readline validation directly, rather than only testing the non-interactive early
exit. Mock interactive() and readline() using a testthat version-compatible
approach, then verify oversized numeric input such as "999999999999" and
non-matching input such as "abc" are rejected and repeated invalid responses
reach the "Too many invalid common item confirmation attempts" error; ensure the
packageโ€™s testthat dependency supports the chosen mocking mechanism.
๐Ÿค– Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@aFIPC.Rcheck/00_pkg_src/aFIPC/man/autoFIPC.Rd`:
- Around line 38-48: Roxygen documentation in the source contains the typos โ€œset
the thisโ€ and โ€œdefalut.โ€ Update the corresponding parameter descriptions in the
roxygen comments for the aFIPC configuration documentation in R/aFIPC.R, then
regenerate the .Rd file instead of editing the generated documentation directly.

In `@aFIPC.Rcheck/00_pkg_src/aFIPC/R/aFIPC.R`:
- Around line 88-91: Restrict the itemtype validation near nItems to accept only
a single value, since downstream scalar conditions in the aFIPC processing flow
(including the checks at lines 166, 189, 385, 408, 607, 657, and 891) do not
support per-item vectors. Update the validation error to require length 1 and
remove the length nItems acceptance path.
- Around line 1-4: aFIPC.Rcheck/ ์ „์ฒด๋Š” R CMD check ์‚ฐ์ถœ๋ฌผ์ด๋ฏ€๋กœ ๋ฒ„์ „ ๊ด€๋ฆฌ์—์„œ ์ œ๊ฑฐํ•˜์„ธ์š”.
aFIPC.Rcheck/00_pkg_src/aFIPC/R/aFIPC.R(1-4),
aFIPC.Rcheck/00_pkg_src/aFIPC/tests/testthat/test-optimization-equivalence.R(1-20),
aFIPC.Rcheck/tests/testthat/test-optimization-equivalence.R(1-20)์„ ์‚ญ์ œํ•˜๊ณ 
R/aFIPC.R ๋ฐ tests/testthat/ ์•„๋ž˜ ์ •๋ณธ๋งŒ ์œ ์ง€ํ•˜์„ธ์š”. ์žฌ์ƒ์„ฑ์„ ๋ง‰๊ธฐ ์œ„ํ•ด .gitignore์— *.Rcheck/ ํŒจํ„ด๋„
์ถ”๊ฐ€ํ•˜์„ธ์š”.
- Around line 627-647: Handle the all-FALSE valid_idx case before constructing
IPDData: when no common items match, skip or return from the IPD generation
block using the existing function behavior. Otherwise, keep IPDItemCount
positive and generate column names from the matched item count without allowing
1:0 to produce invalid names.
- Around line 853-868: Update the forceNormalZeroOne branch to identify MEAN_1
instead of MEAN_11, and apply symmetric est = FALSE and value assignments for
both NewScaleParms and OldScaleParms. Ensure COV_11 remains fixed to 1 and
MEAN_1 is fixed to 0 in both parameter groups.

In `@aFIPC.Rcheck/aFIPC/DESCRIPTION`:
- Line 4: ํ†ต์ผ๋œ ์ •์‹ ๋ฒ„์ „์„ ์„ ํƒํ•œ ๋’ค DESCRIPTION์˜ Version๊ณผ aFIPC ๋ฐฐ๋„ˆ๊ฐ€ ๋™์ผํ•œ ๋ฒ„์ „์„ ์‚ฌ์šฉํ•˜๋„๋ก ์ˆ˜์ •ํ•˜์„ธ์š”.
ํŠนํžˆ DESCRIPTION์˜ Version: 0.1.0๊ณผ aFIPC.R์˜ ๋ฐฐ๋„ˆ๋ฅผ ํ•จ๊ป˜ ๊ฐฑ์‹ ํ•˜๊ณ , ๋‘ ์œ„์น˜์˜ ๋ฒ„์ „ ํ‘œ๊ธฐ๋ฅผ ์ผ์น˜์‹œํ‚ค์„ธ์š”.
- Line 11: Update aFIPC.Rcheck/aFIPC/DESCRIPTION:11 to use the simplified GPL-3
license declaration. Update aFIPC.Rcheck/aFIPC/LICENSE:1-2 as needed only if
retaining the file LICENSE reference, replacing the current template text with
the actual GPL-3 license body.

In `@aFIPC.Rcheck/aFIPC/html/00Index.html`:
- Around line 26-27: Update the \description{} content in the source surveyFA.Rd
documentation to describe surveyFAโ€™s actual functionality instead of repeating
the function name, then regenerate the corresponding HTML package index output
so the surveyFA entry uses that description.

In `@aFIPC.Rcheck/aFIPC/html/R.css`:
- Line 127: Update the font-family declaration in the R.css stylesheet to quote
the multi-word โ€œCourier Newโ€ font name, while preserving the existing Courier
fallback.

In `@aFIPC.Rcheck/tests/testthat/test-autoFIPC.R`:
- Around line 1-91: Remove the duplicated test-autoFIPC.R artifact under the
aFIPC.Rcheck/ directory from the repository, and remove any other committed R
CMD check output in that directory as applicable. Keep the canonical
tests/testthat/test-autoFIPC.R file unchanged.

In `@aFIPC.Rcheck/tests/testthat/test-surveyFA.R`:
- Around line 61-70: Update the surveyFA exhaustion test to call set.seed()
before generating the rbinom() data, using the established deterministic-test
pattern such as the L3 test. Keep the requested scope focused on
reproducibility; do not alter the dataset shape unless needed to exercise the
autofix repetition path.

---

Nitpick comments:
In `@aFIPC.Rcheck/00_pkg_src/aFIPC/tests/testthat/test-autoFIPC.R`:
- Around line 1-25: Extend the tests around autoFIPC to exercise checkCorrectโ€™s
interactive readline validation directly, rather than only testing the
non-interactive early exit. Mock interactive() and readline() using a testthat
version-compatible approach, then verify oversized numeric input such as
"999999999999" and non-matching input such as "abc" are rejected and repeated
invalid responses reach the "Too many invalid common item confirmation attempts"
error; ensure the packageโ€™s testthat dependency supports the chosen mocking
mechanism.

In `@aFIPC.Rcheck/aFIPC-Ex.R`:
- Around line 33-41: autoFIPC ์˜ˆ์ œ๋ฅผ ์‹คํ–‰ ๊ฐ€๋Šฅํ•œ ์ตœ์†Œ ์˜ˆ์ œ๋กœ ์ˆ˜์ •ํ•˜๊ณ ,
new_modelยทold_modelยทcommon_newยทcommon_old ๋“ฑ ํ•„์š”ํ•œ toy ์ž…๋ ฅ๊ณผ ๋ชจ๋ธ ์ƒ์„ฑ ์ ˆ์ฐจ๋ฅผ ํฌํ•จํ•˜์„ธ์š”. ์˜ˆ์ œ๋ฅผ ์‹ค์ œ๋กœ
์‹คํ–‰ํ•ด API ๊ณ„์•ฝ์„ ๊ฒ€์ฆํ•  ์ˆ˜ ์žˆ๋„๋ก Not run ์ƒํƒœ๋ฅผ ์ œ๊ฑฐํ•˜๊ณ  ์‚ฐ์ถœ๋ฌผ์„ ์žฌ์ƒ์„ฑํ•˜๋ฉฐ, ์‹คํ–‰์ด ๋ถˆ๊ฐ€๋Šฅํ•œ ๊ฒฝ์šฐ์—๋Š” ์›๋ณธ Rd ๋ฌธ์„œ์— ๊ทธ ์‚ฌ์œ ์™€
ํ•„์š”ํ•œ ์ ˆ์ฐจ๋ฅผ ๋ช…์‹œํ•œ ๋’ค ์žฌ์ƒ์„ฑํ•˜์„ธ์š”.

In `@aFIPC.Rcheck/aFIPC/Meta/Rd.rds`:
- Line 1: Remove the generated RDS metadata artifact under
aFIPC.Rcheck/aFIPC/Meta from version control and add the corresponding
aFIPC.Rcheck build/check output pattern to the repositoryโ€™s ignore configuration
so CI recreates it during package checks.

In `@aFIPC.Rcheck/aFIPC/R/aFIPC.rdb`:
- Line 1: Remove the generated R CMD check artifacts under the aFIPC.Rcheck
tree, including aFIPC.rdb and any logs, RDS files, help databases, and installed
package copies; ensure the entire generated directory is excluded from version
control and retain validation results through CI artifacts instead.

In `@aFIPC.Rcheck/tests/testthat/test-fixed-parameter-calibration.R`:
- Around line 83-88: Update the assertions around linked_structural and the
corresponding linked_fixed and L115 checks so they first assert that the
filtered g/u rows exist and are non-empty, then verify their est values are
false. Ensure empty filtered vectors fail the test instead of allowing
expect_false(any(...)) to pass.

In `@aFIPC.Rcheck/tests/testthat/test-optimization-equivalence.R`:
- Around line 37-50: Refactor the category-count logic used by autoFIPC into a
shared internal helper, then update both the implementation and this test to
call that helper instead of duplicating length(na.omit(unique(x))). Preserve the
comparison with the legacy levels(as.factor(x)) expression and the existing
expected-value assertions.

In `@aFIPC.Rcheck/tests/testthat/test-sentinel-validation.R`:
- Around line 1-37: Add coverage for the new ^[12]$ input validation in the
readline confirmation paths, targeting checkCorrect, checknewformBILOGprior, and
checkoldformBILOGprior. Verify exact-match handling and termination after more
than three invalid attempts, including non-interactive confirmCommonItems = NULL
terminating clearly and confirmCommonItems = FALSE terminating with โ€œPlease
write down pairs correctlyโ€.
๐Ÿช„ Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

โ„น๏ธ Review info
โš™๏ธ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c63e58ea-be92-44ce-a4fc-178f882b04f1

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 3d93289 and fbb5113.

โ›” Files ignored due to path filters (3)
  • aFIPC.Rcheck/00check.log is excluded by !**/*.log
  • aFIPC.Rcheck/00install.out is excluded by !**/*.out
  • aFIPC.Rcheck/aFIPC-Ex.pdf is excluded by !**/*.pdf
๐Ÿ“’ Files selected for processing (51)
  • aFIPC.Rcheck/00_pkg_src/aFIPC/DESCRIPTION
  • aFIPC.Rcheck/00_pkg_src/aFIPC/LICENSE
  • aFIPC.Rcheck/00_pkg_src/aFIPC/NAMESPACE
  • aFIPC.Rcheck/00_pkg_src/aFIPC/R/aFIPC.R
  • aFIPC.Rcheck/00_pkg_src/aFIPC/R/surveyFA.R
  • aFIPC.Rcheck/00_pkg_src/aFIPC/README.md
  • aFIPC.Rcheck/00_pkg_src/aFIPC/man/autoFIPC.Rd
  • aFIPC.Rcheck/00_pkg_src/aFIPC/man/surveyFA.Rd
  • aFIPC.Rcheck/00_pkg_src/aFIPC/tests/testthat.R
  • aFIPC.Rcheck/00_pkg_src/aFIPC/tests/testthat/test-autoFIPC.R
  • aFIPC.Rcheck/00_pkg_src/aFIPC/tests/testthat/test-fixed-parameter-calibration.R
  • aFIPC.Rcheck/00_pkg_src/aFIPC/tests/testthat/test-optimization-equivalence.R
  • aFIPC.Rcheck/00_pkg_src/aFIPC/tests/testthat/test-package-api.R
  • aFIPC.Rcheck/00_pkg_src/aFIPC/tests/testthat/test-sentinel-validation.R
  • aFIPC.Rcheck/00_pkg_src/aFIPC/tests/testthat/test-surveyFA.R
  • aFIPC.Rcheck/R_check_bin/R
  • aFIPC.Rcheck/R_check_bin/Rscript
  • aFIPC.Rcheck/aFIPC-Ex.R
  • aFIPC.Rcheck/aFIPC-Ex.Rout
  • aFIPC.Rcheck/aFIPC-Ex.timings
  • aFIPC.Rcheck/aFIPC/DESCRIPTION
  • aFIPC.Rcheck/aFIPC/INDEX
  • aFIPC.Rcheck/aFIPC/LICENSE
  • aFIPC.Rcheck/aFIPC/Meta/Rd.rds
  • aFIPC.Rcheck/aFIPC/Meta/features.rds
  • aFIPC.Rcheck/aFIPC/Meta/hsearch.rds
  • aFIPC.Rcheck/aFIPC/Meta/links.rds
  • aFIPC.Rcheck/aFIPC/Meta/nsInfo.rds
  • aFIPC.Rcheck/aFIPC/Meta/package.rds
  • aFIPC.Rcheck/aFIPC/NAMESPACE
  • aFIPC.Rcheck/aFIPC/R/aFIPC
  • aFIPC.Rcheck/aFIPC/R/aFIPC.rdb
  • aFIPC.Rcheck/aFIPC/R/aFIPC.rdx
  • aFIPC.Rcheck/aFIPC/help/AnIndex
  • aFIPC.Rcheck/aFIPC/help/aFIPC.rdb
  • aFIPC.Rcheck/aFIPC/help/aFIPC.rdx
  • aFIPC.Rcheck/aFIPC/help/aliases.rds
  • aFIPC.Rcheck/aFIPC/help/paths.rds
  • aFIPC.Rcheck/aFIPC/html/00Index.html
  • aFIPC.Rcheck/aFIPC/html/R.css
  • aFIPC.Rcheck/tests/startup.Rs
  • aFIPC.Rcheck/tests/testthat.R
  • aFIPC.Rcheck/tests/testthat.Rout
  • aFIPC.Rcheck/tests/testthat/test-autoFIPC.R
  • aFIPC.Rcheck/tests/testthat/test-fixed-parameter-calibration.R
  • aFIPC.Rcheck/tests/testthat/test-optimization-equivalence.R
  • aFIPC.Rcheck/tests/testthat/test-package-api.R
  • aFIPC.Rcheck/tests/testthat/test-sentinel-validation.R
  • aFIPC.Rcheck/tests/testthat/test-surveyFA.R
  • test_dummy.R
  • test_validation.R
๐Ÿ’ค Files with no reviewable changes (2)
  • test_validation.R
  • test_dummy.R

Comment thread aFIPC.Rcheck/00_pkg_src/aFIPC/man/autoFIPC.Rd Outdated
Comment thread aFIPC.Rcheck/00_pkg_src/aFIPC/R/aFIPC.R Outdated
Comment thread aFIPC.Rcheck/00_pkg_src/aFIPC/R/aFIPC.R Outdated
Comment thread aFIPC.Rcheck/00_pkg_src/aFIPC/R/aFIPC.R Outdated
Comment thread aFIPC.Rcheck/00_pkg_src/aFIPC/R/aFIPC.R Outdated
Comment thread aFIPC.Rcheck/aFIPC/DESCRIPTION Outdated
Comment thread aFIPC.Rcheck/aFIPC/html/00Index.html Outdated
Comment thread aFIPC.Rcheck/aFIPC/html/R.css Outdated
Comment thread aFIPC.Rcheck/tests/testthat/test-autoFIPC.R Outdated
Comment thread aFIPC.Rcheck/tests/testthat/test-surveyFA.R Outdated
โ€ฆ issue

Fixed weak regex validation for integer conversion via readline() in R/aFIPC.R to prevent DoS or crashes via as.integer() type coercion.
Added `.semgrepignore` to `.Rbuildignore` to fix `R CMD check` CI failure regarding unrecognized hidden files.
Removed `test_dummy.R` and `test_validation.R` from the top level and added `aFIPC.Rcheck` to `.gitignore` to fix `R CMD check` due to non-standard files found.
Copilot AI review requested due to automatic review settings July 26, 2026 17:16

Copilot AI 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.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

.jules/sentinel.md:6

  • The new sentinel entry is dated 2024-07-26, but this PR is dated 2026-07-26. If this is meant to be a running incident log, the year should match the actual fix date to avoid confusion when auditing security learnings later.
## 2024-07-26 - Integer Coercion Vulnerability from readline()

Comment thread R/aFIPC.R
Comment on lines 141 to 146
}
for (attempt in seq_len(3)) {
n <- readline(prompt = "Is it correct? (1: Yes 2: No) : ")
if (grepl("^[0-9]+$", n)) {
if (grepl("^[12]$", n)) {
return(as.integer(n))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants