anthropics / anthropics/claude-code
[Bug] File overwrite without existence check in bash auto mode
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
**Bug Description**
This is very bad. Claude did override a config file without checking for its existence because it's using bash to write files and auto mode (no write tool)
File in question is staticwebapp.config.json which had security protection rules that got completely wiped, would have made my internal site exposed to the public if I didn't catch it.
**Environment Info**
- Platform: darwin
- Terminal: vscode
- Version: 2.1.271
- Feedback ID: 14db9a66-a42d-4505-90cb-6f9c02323aec
**Errors**
```json
[]
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the overwrite in bash auto mode with an existing staticwebapp.config.json, then trace the auto-mode file-writing entry point. Done means an existing file is checked before writing and its contents, including security protection rules, are preserved unless an explicit safe overwrite is intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100