Skip to content

Commit eabdee7

Browse files
IMNMVclaude
andcommitted
Restore the unconditional block on system command execution
ClaudeR 0.12.6. A local experiment left validate_code_security gating the system/system2/shell block behind getOption("clauder.allow_system"), and that gate reached a public release. Setting an R option is ordinary code that the validator does not inspect, so an agent could switch the option on through execute_r and then run shell commands: the restriction became advisory rather than enforced. The block is unconditional again and there is no option that lifts it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 2a2f510 commit eabdee7

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: ClaudeR
22
Title: R Integration for Claude AI
3-
Version: 0.12.5
3+
Version: 0.12.6
44
Authors@R: person("Nykko", "Vitali", email = "nykvt@icloud.com", role = c("aut", "cre"))
55
Description: Connects RStudio with Claude AI to enable interactive coding sessions.
66
License: MIT + file LICENSE

R/ui.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1717,11 +1717,11 @@ query_agent_history <- function(agent_filter = "all", requesting_agent = NULL,
17171717
#' @return A list with blocked (logical) and reason (character) fields
17181718

17191719
validate_code_security <- function(code) {
1720-
# System command calls: allowed only when getOption('clauder.allow_system', FALSE) is TRUE (default off = public shipped behavior)
1721-
if (!isTRUE(getOption("clauder.allow_system", FALSE)) && (grepl("\\bsystem\\s*\\(", code) ||
1720+
# System command calls to block completely
1721+
if (grepl("\\bsystem\\s*\\(", code) ||
17221722
grepl("\\bsystem2\\s*\\(", code) ||
17231723
grepl("\\bshell\\s*\\(", code) ||
1724-
grepl("\\bshell\\.exec\\s*\\(", code))) {
1724+
grepl("\\bshell\\.exec\\s*\\(", code)) {
17251725
return(list(
17261726
blocked = TRUE,
17271727
reason = "Security restriction: System command execution is not allowed"

0 commit comments

Comments
 (0)