mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
JavaScript: Introduce suspiciousCredentials predicate (from C# library).
This commit is contained in:
@@ -33,6 +33,15 @@ module HeuristicNames {
|
||||
string nonSuspicious() {
|
||||
result = "(?is).*(redact|censor|obfuscate|hash|md5|sha|((?<!un)(en))?(crypt|code)).*"
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a regular expression that identifies names that look like they represent credential information.
|
||||
*/
|
||||
string suspiciousCredentials() {
|
||||
result = "(?i).*pass(wd|word|code|phrase)(?!.*question).*" or
|
||||
result = "(?i).*(puid|username|userid).*" or
|
||||
result = "(?i).*(cert)(?!.*(format|name)).*"
|
||||
}
|
||||
}
|
||||
private import HeuristicNames
|
||||
|
||||
|
||||
Reference in New Issue
Block a user