You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -487,6 +488,78 @@ if response.metadata.get("reasoning"):
487
488
display_clean_response(response.content)
488
489
```
489
490
491
+
## Dangerous Command Protection
492
+
493
+
The proxy includes built-in protection against dangerous git commands that could potentially destroy your work or repository history. This safety feature detects and blocks destructive git operations before they can cause damage.
When a dangerous git command is detected, the proxy:
544
+
1. Blocks the tool call execution
545
+
2. Returns a descriptive steering message explaining why the command was blocked
546
+
3. Logs the blocked attempt for debugging and security auditing
547
+
4. Suggests safer alternatives when appropriate
548
+
549
+
### Example Blocked Commands
550
+
551
+
```bash
552
+
# These commands will be blocked:
553
+
git reset --hard HEAD
554
+
git clean -f
555
+
git push --force origin main
556
+
git restore .
557
+
git branch -D feature-branch
558
+
git filter-branch --prune-empty
559
+
```
560
+
561
+
**Note**: This protection is enabled by default for security. Only disable it if you understand the risks and need to execute these specific commands for legitimate reasons.
0 commit comments