Skip to content

Commit e977d6e

Browse files
committed
JS: Rewrite to use notSensitiveRegexp
1 parent b9a1a1f commit e977d6e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

javascript/ql/src/semmle/javascript/security/dataflow/CleartextLoggingCustomizations.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module CleartextLogging {
5454
*/
5555
private class NameGuidedNonCleartextPassword extends NonCleartextPassword {
5656
NameGuidedNonCleartextPassword() {
57-
exists(string name | name.regexpMatch(notSensitive()) |
57+
exists(string name | name.regexpMatch(notSensitiveRegexp()) |
5858
this.asExpr().(VarAccess).getName() = name
5959
or
6060
this.(DataFlow::PropRead).getPropertyName() = name
@@ -94,7 +94,7 @@ module CleartextLogging {
9494
* A call that might obfuscate a password, for example through hashing.
9595
*/
9696
private class ObfuscatorCall extends Barrier, DataFlow::InvokeNode {
97-
ObfuscatorCall() { getCalleeName().regexpMatch(notSensitive()) }
97+
ObfuscatorCall() { getCalleeName().regexpMatch(notSensitiveRegexp()) }
9898
}
9999

100100
/**
@@ -113,7 +113,7 @@ module CleartextLogging {
113113
ObjectPasswordPropertySource() {
114114
exists(DataFlow::PropWrite write |
115115
name.regexpMatch(maybePassword()) and
116-
not name.regexpMatch(notSensitive()) and
116+
not name.regexpMatch(notSensitiveRegexp()) and
117117
write = this.(DataFlow::SourceNode).getAPropertyWrite(name) and
118118
// avoid safe values assigned to presumably unsafe names
119119
not write.getRhs() instanceof NonCleartextPassword

0 commit comments

Comments
 (0)