mirror of
https://github.com/github/codeql.git
synced 2026-04-23 15:55:18 +02:00
Swift: Attempt to speed up evaluation of the private information regex for Swift.
This commit is contained in:
@@ -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)|")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user