sync: migrate ai-operator to Gitea (2026-08-10)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package redaction
|
||||
|
||||
import "regexp"
|
||||
|
||||
var (
|
||||
openAIKeyPattern = regexp.MustCompile(`sk-[A-Za-z0-9_-]{8,}`)
|
||||
bearerPattern = regexp.MustCompile(`(?i)Bearer\s+[A-Za-z0-9._~+/-]+=*`)
|
||||
secretKVPattern = regexp.MustCompile(`(?i)(password|secret|api_key|token)=([^\s&]+)`)
|
||||
databaseURLPattern = regexp.MustCompile(`(?i)(postgres(?:ql)?://[^:\s/]+):([^@\s]+)@`)
|
||||
emailPattern = regexp.MustCompile(`(?i)\b([A-Z0-9._%+-])([A-Z0-9._%+-]*)(@[A-Z0-9.-]+\.[A-Z]{2,})\b`)
|
||||
phonePattern = regexp.MustCompile(`(?:\+7|8)\d{10}`)
|
||||
digits12Pattern = regexp.MustCompile(`\b\d{12}\b`)
|
||||
digits16Pattern = regexp.MustCompile(`\b\d{16}\b`)
|
||||
otpPattern = regexp.MustCompile(`(?i)((?:код(?: подтверждения)?|sms|смс|otp)[^0-9]{0,20})(\d{4,8})`)
|
||||
accountPattern = regexp.MustCompile(`(?i)((?:лицев(?:ой|ого)\s+сч[её]т)\D{0,20})(\d{5,20})`)
|
||||
)
|
||||
Reference in New Issue
Block a user