Swift: Attempt to speed up evaluation of the private information regex for Swift.

This commit is contained in:
Geoffrey White
2024-07-17 15:28:05 +01:00
parent 1f13e462b1
commit 7029de5989

View File

@@ -64,9 +64,9 @@ class SensitivePrivateInfo extends SensitiveDataType, TPrivateInfo {
override string toString() { result = "private information" }
override string getRegexp() {
// we've had good results for the e-mail heuristic in Swift, which isn't part of the default regex. Add it in.
result = HeuristicNames::maybeSensitiveRegexp(SensitiveDataClassification::private())
or
result = "(?is).*e(mail|_mail).*"
.replaceAll(".*(", ".*(e(mail|_mail)|")
}
}