-
Notifications
You must be signed in to change notification settings - Fork 0
π‘οΈ Sentinel: [CRITICAL] μ λ ₯ κ° κ²μ¦ κ°νλ₯Ό ν΅ν DoS(NA Coercion) λ°©μ§ #289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
0adaed3
3f08a91
c3f118a
8a19598
1f24c24
94964a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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)) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π Info: Retry loop rejects non-1/2 digits differently With Was this helpful? React with π or π to provide feedback. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π Info: Regex tightening applied to all binary prompts All three interactive Was this helpful? React with π or π to provide feedback. |
||
| return(as.integer(n)) | ||
| } | ||
| } | ||
|
|
@@ -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)) | ||
| } | ||
| } | ||
|
|
@@ -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)) | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| test_that("autoFIPC validates boolean flags for newformBILOGprior, oldformBILOGprior, and confirmCommonItems", { | ||
| # newformBILOGprior | ||
| expect_error( | ||
| aFIPC::autoFIPC( | ||
| autoFIPC( | ||
| newformXData = data.frame(A=1), | ||
| oldformYData = data.frame(A=2), | ||
| newformCommonItemNames = c('A'), | ||
|
|
@@ -13,7 +13,7 @@ test_that("autoFIPC validates boolean flags for newformBILOGprior, oldformBILOGp | |
|
|
||
| # oldformBILOGprior | ||
| expect_error( | ||
| aFIPC::autoFIPC( | ||
| autoFIPC( | ||
| newformXData = data.frame(A=1), | ||
| oldformYData = data.frame(A=2), | ||
| newformCommonItemNames = c('A'), | ||
|
|
@@ -25,7 +25,7 @@ test_that("autoFIPC validates boolean flags for newformBILOGprior, oldformBILOGp | |
|
|
||
| # confirmCommonItems | ||
| expect_error( | ||
| aFIPC::autoFIPC( | ||
| autoFIPC( | ||
| newformXData = data.frame(A=1), | ||
| oldformYData = data.frame(A=2), | ||
| newformCommonItemNames = c('A'), | ||
|
|
@@ -35,3 +35,23 @@ test_that("autoFIPC validates boolean flags for newformBILOGprior, oldformBILOGp | |
| "Security Error: confirmCommonItems must be a single non-NA logical value or NULL" | ||
| ) | ||
| }) | ||
|
|
||
| test_that("large numbers do not cause NA coercion errors in autoFIPC readline prompt", { | ||
|
|
||
| # Give a huge number that passes ^[0-9]+$ but fails as.integer() | ||
| # Then give a valid '2' to continue if it rejects the first one | ||
| m <- mockery::mock("999999999999999999999999999999", "2", "2", "2") | ||
| mockery::stub(autoFIPC, 'readline', m) | ||
| mockery::stub(autoFIPC, 'interactive', TRUE) | ||
|
devin-ai-integration[bot] marked this conversation as resolved.
Comment on lines
+44
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π Info: Test stubs depend on nested lexical scope The test stubs Was this helpful? React with π or π to provide feedback. |
||
|
|
||
| # Check that it rejects the large number correctly by prompting again (which gives 2) and thus stopping | ||
| expect_error({ | ||
| autoFIPC( | ||
| newformXData = data.frame(A=c(1,0,1,0), B=c(1,1,0,0)), | ||
| oldformYData = data.frame(A=c(1,0,1,0), B=c(1,1,0,0)), | ||
| newformCommonItemNames = c('A'), | ||
| oldformCommonItemNames = c('A'), | ||
| confirmCommonItems = NULL | ||
| ) | ||
| }, "Please write down pairs correctly") | ||
| }) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π Info: allowed-endpoints has no effect under audit policy
The workflow adds
allowed-endpointswhile keepingegress-policy: audit. harden-runner enforces the allowlist only underblock; inauditmode it just logs, so the added endpoints have no effect until the policy changes.Was this helpful? React with π or π to provide feedback.