fix SetAllowPatterns case-insensitive behavior

This commit is contained in:
野生派Coder~
2026-02-14 13:57:32 +08:00
parent 01b56f2398
commit acb6796668
3 changed files with 119 additions and 7 deletions

View File

@@ -28,11 +28,11 @@ var destructivePatterns = []*regexp.Regexp{
regexp.MustCompile(`\bchown\b.+\s+/`),
regexp.MustCompile(`\bclawgo\s+uninstall\b`),
regexp.MustCompile(`\bdbt\s+drop\b`),
regexp.MustCompile(`\bgit\s+clean\b`),
}
var moderatePatterns = []*regexp.Regexp{
regexp.MustCompile(`\bgit\s+reset\s+--hard\b`),
regexp.MustCompile(`\bgit\s+clean\b`),
regexp.MustCompile(`\bdocker\s+system\s+prune\b`),
regexp.MustCompile(`\bapt(-get)?\s+install\b`),
regexp.MustCompile(`\byum\s+install\b`),