Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@
^\.jules(/.*)?$
^\.trivyignore\.yaml$
^trivy\.yaml$
^\.semgrepignore$
^test_dummy\.R$
^test_validation\.R$
Comment on lines +25 to +27
Comment on lines +25 to +27
2 changes: 1 addition & 1 deletion .github/workflows/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ jobs:
uses: r-lib/actions/check-r-package@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590
with:
args: 'c("--no-manual", "--as-cran")'
error-on: '"error"'
error-on: '"warning"'
Comment on lines 45 to +48
5 changes: 5 additions & 0 deletions .jules/sentinel.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
**Vulnerability:** Unvalidated inputs passed to `if()` statements can cause process crashes (`condition has length > 1`) or unexpected coercion vulnerabilities.
**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-27 - [Integer Overflow Coercion Vulnerability]
**Vulnerability:** Unbounded regex for digit matching (`^[0-9]+$`) allows excessively large numeric strings to pass validation, causing `as.integer()` to return NA and crash the process.
**Learning:** `readline()` input validation must strictly match expected values, not just unbounded digits, to prevent integer overflow coercion.
**Prevention:** Use strictly bounded regex patterns (e.g., `^[12]$`) when validating finite sets of acceptable interactive numeric inputs.
6 changes: 3 additions & 3 deletions R/aFIPC.R
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ autoFIPC <-
}
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))
}
}
Expand Down Expand Up @@ -171,7 +171,7 @@ autoFIPC <-
readline(
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)) {
return(as.integer(n))
}
}
Expand Down Expand Up @@ -390,7 +390,7 @@ autoFIPC <-
readline(
prompt = "Do you want to use default BILOG-MG priors for newform Data? (1: Yes 2: No) : "
)
if (grepl("^[0-9]+$", n)) {
if (grepl("^[12]$", n)) {
return(as.integer(n))
}
}
Expand Down
Binary file added actionlint
Binary file not shown.
Binary file added actionlint_1.7.10_linux_amd64.tar.gz
Binary file not shown.
11 changes: 11 additions & 0 deletions actionlint_checksums.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
16782c41f2af264db80f855ee5d09164ca98fc78edf3bcd0f46eecff279682ba actionlint_1.7.10_darwin_amd64.tar.gz
004ca87b367b37f4d75c55ab6cf80f9b8c043adbfbd440f31c604d417939c442 actionlint_1.7.10_darwin_arm64.tar.gz
31ec5ee4deef04edf3b9eb3bac5243d785b5dccf70688e02a022b0723bfae80a actionlint_1.7.10_freebsd_386.tar.gz
Comment on lines +1 to +3
418461873e1f8eb7acc7524d70d4c33e99f9aab53da8625f4a3c50273612c930 actionlint_1.7.10_freebsd_amd64.tar.gz
b728a3c31f7bd37d3026a7cd87148da9ddf845b5d56213fcc410bb222523c7d0 actionlint_1.7.10_linux_386.tar.gz
f4c76b71db5755a713e6055cbb0857ed07e103e028bda117817660ebadb4386f actionlint_1.7.10_linux_amd64.tar.gz
cd3dfe5f66887ec6b987752d8d9614e59fd22f39415c5ad9f28374623f41773a actionlint_1.7.10_linux_arm64.tar.gz
7624bae3f6e41985f498de7b246a2334cd734b9f1a8f04a9748429cbcf99b750 actionlint_1.7.10_linux_armv6.tar.gz
1783f8a1dd59a67dae373e753a88592351e00128195bc9ddd2b836a0c31df71b actionlint_1.7.10_windows_386.zip
283467f9d6202a8cb8c00ad8dd0ee4e685b71fb86a6a56c68fcbb9ae8ed91237 actionlint_1.7.10_windows_amd64.zip
0c7242bca2f0ee4672a00ce7fa3c7185311fb94cb9e1e0f6bb57d5456e421d80 actionlint_1.7.10_windows_arm64.zip
Comment on lines +1 to +11

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

tmp_dir="$(mktemp -d)"
trap 'rm -rf "$tmp_dir"' EXIT

curl -fsSL \
  'https://github.com/rhysd/actionlint/releases/download/v1.7.10/actionlint_1.7.10_checksums.txt' \
  > "$tmp_dir/actionlint_checksums.txt"
diff -u "$tmp_dir/actionlint_checksums.txt" actionlint_checksums.txt

curl -fsSL \
  'https://github.com/gitleaks/gitleaks/releases/download/v8.24.2/gitleaks_8.24.2_checksums.txt' \
  > "$tmp_dir/gitleaks_checksums.txt"
diff -u "$tmp_dir/gitleaks_checksums.txt" gitleaks_checksums.txt

Repository: ContextualWisdomLab/aFIPC

Length of output: 163


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '\n## files\n'
git ls-files | rg '(^|/)(actionlint_checksums\.txt|gitleaks_checksums\.txt|\.github/workflows/.*\.ya?ml)$'

printf '\n## references\n'
rg -n 'actionlint_checksums\.txt|gitleaks_checksums\.txt|actionlint_1\.7\.10_checksums\.txt|gitleaks_8\.24\.2_checksums\.txt|rhysd/actionlint|gitleaks/gitleaks|checksums' .github/workflows actionlint_checksums.txt gitleaks_checksums.txt

Repository: ContextualWisdomLab/aFIPC

Length of output: 1621


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '\n## workflow snippets\n'
for f in $(git ls-files '.github/workflows/*.y*ml'); do
  echo "--- $f"
  rg -n -C 3 'actionlint_checksums\.txt|gitleaks_checksums\.txt|rhysd/actionlint|gitleaks/gitleaks|curl|download|checksum' "$f" || true
done

Repository: ContextualWisdomLab/aFIPC

Length of output: 2135


워크플로가 커밋된 체크섬을 직접 읽도록 바꾸세요.

.github/workflows/code-quality.yml.github/workflows/security-audit.yml는 각 릴리스의 *_checksums.txt를 다시 내려받아 같은 파일명으로 덮어씁니다. 그래서 actionlint_checksums.txtgitleaks_checksums.txt는 CI 검증에 반영되지 않습니다. 커밋된 파일을 직접 사용하거나, 계속 원격 파일을 받을 거라면 이 파일들은 제거하세요.

📍 Affects 2 files
  • actionlint_checksums.txt#L1-L11 (this comment)
  • gitleaks_checksums.txt#L1-L11
🤖 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 `@actionlint_checksums.txt` around lines 1 - 11, Update
.github/workflows/code-quality.yml and .github/workflows/security-audit.yml to
use the committed actionlint_checksums.txt and gitleaks_checksums.txt files
directly instead of downloading and overwriting them; apply the corresponding
change to actionlint_checksums.txt (anchor, lines 1-11) and
gitleaks_checksums.txt (sibling, lines 1-11), preserving checksum verification
against the committed contents.

Binary file added gitleaks
Binary file not shown.
Binary file added gitleaks_8.24.2_linux_x64.tar.gz
Binary file not shown.
11 changes: 11 additions & 0 deletions gitleaks_checksums.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
1b02cabc28d712016f33465420dc73a0f4d094c9837053adc32538610fe2e314 gitleaks_8.24.2_windows_armv6.zip
2f3ecedaab2721c4b1112a4078c63eddd3801b5771f53261da065ff57dae6daa gitleaks_8.24.2_windows_x32.zip
3d3371d0c3efc138cf1b349086fae8f3f4b84eee83a16518521f589daecfbd40 gitleaks_8.24.2_linux_x32.tar.gz
Comment on lines +1 to +3
574a6d52573c61173add7ddb5e3cc68c0e82cb0735818a1eeb9a0a2de1643fbc gitleaks_8.24.2_linux_arm64.tar.gz
8a406523f5fc73749d1897e2bf1bfe34bac80fcbf0211121d549517dd9435077 gitleaks_8.24.2_linux_armv6.tar.gz
90d13686937ac7429b97a3acbf1e1d0ce90d92ae2d0cf46a690bd8ae5230bea0 gitleaks_8.24.2_darwin_arm64.tar.gz
abb8a1efb469d8f85bfbad1d106bda2de9552f23b3a3e423436f693898015e72 gitleaks_8.24.2_windows_armv7.zip
bc3c46f8039ba716ba8461fa6745c9d1cfb90ca2f5f881d8d0cf66b7ba7b742c gitleaks_8.24.2_darwin_x64.tar.gz
c7b67d534e7dc207fca98b44895d8dbbff89b32b0233910c75cb2c3d6910cefb gitleaks_8.24.2_linux_armv7.tar.gz
cc47fdc0364964e2d346fbbcbe4cc87f34d490b2647508fb05930d0ec2fbff07 gitleaks_8.24.2_windows_x64.zip
fa0500f6b7e41d28791ebc680f5dd9899cd42b58629218a5f041efa899151a8e gitleaks_8.24.2_linux_x64.tar.gz
Loading