feat: add bash validation submodules — readOnlyValidation, destructiveCommandWarning, modeValidation, sedValidation, pathValidation, commandSemantics
Ports 6 of 9 upstream BashTool validation submodules: - readOnlyValidation: blocks write/state-modifying commands in read-only mode - destructiveCommandWarning: flags dangerous commands (rm -rf /, fork bombs, etc.) - modeValidation: enforces permission mode constraints on commands - sedValidation: blocks sed -i in read-only mode - pathValidation: detects directory traversal and home dir escapes - commandSemantics: classifies command intent (read-only, write, destructive, network, etc.) Full validation pipeline: validate_command() runs all checks in priority order. 32 new tests covering all validation paths. Remaining bash submodules for separate lane: bashPermissions, bashSecurity, shouldUseSandbox
This commit is contained in:
parent
85c5b0e01d
commit
36dac6cbbe
2 changed files with 1005 additions and 0 deletions
1004
rust/crates/runtime/src/bash_validation.rs
Normal file
1004
rust/crates/runtime/src/bash_validation.rs
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,5 @@
|
|||
mod bash;
|
||||
pub mod bash_validation;
|
||||
mod bootstrap;
|
||||
mod compact;
|
||||
mod config;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue