Tool Parameter Abuse
- Category
- Tool Misuse
- Confidence
- 94% confidence
- Finding
The skill explicitly includes a destructive command,
git reset --hard HEAD~1, which can irreversibly discard local changes and rewrite repository state if executed without safeguards. In a skill meant to help users run commands quickly, presenting this command inline increases the chance of accidental destructive use, especially by less experienced users or when an agent auto-suggests or auto-runs commands.- Content
md # 回退提交 git reset --soft HEAD~1 # 保留更改在暂存区 git reset --mixed HEAD~1 # 保留更改在工作区(默认) git reset --hard HEAD~1 # 完全删除更改 # 创建反向提交 git revert <commit> # 安全撤销指定提交
