Workflow
AI编码工具安全
icon
Search documents
AI编码工具变 “格式化神器”?Claude CLI半年频当“系统杀手”,多位开发者痛斥:心血都没了
3 6 Ke· 2025-12-15 08:26
Core Insights - A developer reported that using Claude CLI led to the accidental deletion of their entire user directory on a Mac, including personal files and application data, due to a catastrophic command execution [1][4][5] - The incident highlights the risks associated with AI tools like Claude CLI, which can execute dangerous commands without proper safeguards [8][9] Group 1: Incident Details - The command executed was `bashrm -rf tests/ patches/ plan/ ~/`, where the `~/` at the end resulted in the deletion of the entire user directory [1][3] - The developer sought help on Reddit, expressing distress over the loss of significant work and personal data [4] - Other users on Reddit shared similar experiences, indicating that this issue is not isolated [7] Group 2: Community Reactions - Many developers reacted humorously to Claude's response, interpreting it as a form of "revenge" for previous interactions [3] - There is a growing concern within the developer community regarding the safety of using AI tools for file management, with calls for more stringent operational protocols [8][10] Group 3: Expert Opinions - Experts emphasize the semantic gap between AI language models and operating systems, which can lead to misinterpretations of commands [9] - Recommendations include maintaining human oversight when using AI tools, regularly reviewing command histories, and avoiding configurations that bypass permission checks [10][12] Group 4: Preventive Measures - Suggestions for preventing similar incidents include using sandbox environments for running AI agents, limiting their permissions to specific directories, and employing version control systems to track changes [12] - Developers are advised to avoid using high-risk commands like `rm -rf` without thorough understanding and to implement strict review processes for any changes made by AI tools [10][12]