fix: harden destructive command matching

This commit is contained in:
Haoran
2026-08-26 15:07:59 +08:00
parent 44e33d0ec3
commit 1293797585
55 changed files with 3328 additions and 690 deletions

View File

@@ -198,10 +198,6 @@ complete_task(tests.id) # ✓ Completed
---
## 继承的权限规则
本章沿用 s04 的权限 hook只在命令开头或 shell 分隔符(`;``&&``||``|``&`、括号或换行)之后,按大小写不敏感方式识别完整的 `rm`/`del` 命令词。`model``delimiter``echo del test.txt` 不会被当成危险命令。
## 试一下
```sh