Files
Your Name e26a3e559f feat: 支持 shell 变量定义(VAR=value command)、export、多行命令
完整 shell 能力支持:
- VAR=value command 语法(自动跳过赋值检测实际 binary)
- export VAR=value 支持(export 加入只读白名单)
- 多行命令(\n 分割后逐段检查)
- && || ; 等连接符的武器级命令检测
- _split_into_commands 重写:使用 while 索引遍历,正确处理 && / || / |
- _command_has_dangerous_cmds 跳过 VAR=value 和 export 前缀
- classify_agent_command 检测 VAR=value kubectl 语法路由到 kubectl 分类器
- execute_command 支持变量赋值后的 binary 定位
- 新增 shell 内置白名单:echo printf cd pwd export source . sleep timeout
  nohup unset shift return local readonly trap type command set shopt eval
  exec alias unalias declare typeset read mapfile
- 白名单只读命令新增:timeout、nohup、sleep 等
2026-07-25 16:25:41 +08:00
..