Skip to content

fix(s03): add 'del' keyword to Gate 2 bash rule for Windows compatibility#449

Open
Owenmzz wants to merge 1 commit into
shareAI-lab:mainfrom
Owenmzz:fix/s03-gate2-add-del-keyword
Open

fix(s03): add 'del' keyword to Gate 2 bash rule for Windows compatibility#449
Owenmzz wants to merge 1 commit into
shareAI-lab:mainfrom
Owenmzz:fix/s03-gate2-add-del-keyword

Conversation

@Owenmzz

@Owenmzz Owenmzz commented Jul 5, 2026

Copy link
Copy Markdown

变更说明

s03_permission 的闸门 2(Gate 2)中,bash 工具的破坏性命令检查关键词列表中添加了 "del"

原因

Windows 原生删除命令为 del(等价于 Linux/macOS 的 rm),原关键词列表只包含 ["rm ", "> /etc/", "chmod 777"],导致 Windows 平台上执行 Delete the file test.txt 时,模型生成 del test.txt 命令绕过权限检查,文件被直接删除,无用户确认。

复现环境

  • 操作系统:Windows
  • 运行命令:python s03_permission/code.py
  • 模型:mimo-v2.5-pro(mimo token plan)
  • 测试 prompt:Delete the file test.txt

关联 Issue

Closes #448

改动范围

  • s03_permission/code.py — 在 Gate 2 bash 规则的关键词列表中添加 "del"
  • s03_permission/README.md(中文)— 同步代码块
  • s03_permission/README.en.md(英文)— 同步代码块
  • s03_permission/README.ja.md(日文)— 同步代码块

AI 声明

本 PR 借助 AI 辅助生成,我已阅读并认可所有改动。

…lity

Windows uses 'del' as the native delete command (equivalent to 'rm' on
Linux/macOS). The Gate 2 keyword list only checked for 'rm ', '> /etc/',
and 'chmod 777', so deleting a file via 'del' bypassed the permission
check entirely on Windows.

Add 'del' to the keyword list in code.py and the three README files
(zh/en/ja) to keep them in sync.

Closes shareAI-lab#448
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(s03): Gate 2 keyword list missing del — Windows delete command bypasses permission check

1 participant