fix(s03): add 'del' keyword to Gate 2 bash rule for Windows compatibility#449
Open
Owenmzz wants to merge 1 commit into
Open
fix(s03): add 'del' keyword to Gate 2 bash rule for Windows compatibility#449Owenmzz wants to merge 1 commit into
Owenmzz wants to merge 1 commit into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
在
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命令绕过权限检查,文件被直接删除,无用户确认。复现环境
python s03_permission/code.pymimo-v2.5-pro(mimo token plan)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 辅助生成,我已阅读并认可所有改动。