Skip to content

Commit 9bcbedd

Browse files
committed
update consistency comment in passwords.js
1 parent 664c5e6 commit 9bcbedd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

javascript/ql/test/query-tests/Security/CWE-312/passwords.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
console.log(obj2); // NOT OK
2727

2828
var obj3 = {};
29-
console.log(obj3);
30-
obj3.x = password; // NOT OK
29+
console.log(obj3); // OK - but still flagged due to flow-insensitive field-analysis. [INCONSISTENCY]
30+
obj3.x = password;
3131

3232
var fixed_password = "123";
3333
console.log(fixed_password); // OK
@@ -90,12 +90,12 @@
9090
console.log("Password is: " + redact('password', password));
9191

9292
if (environment.isTestEnv()) {
93-
console.log("Password is: " + password); // OK, but still flagged
93+
console.log("Password is: " + password); // OK, but still flagged [INCONSISTENCY]
9494
}
9595

9696
if (environment.is(TEST)) {
9797
// NB: for security reasons, we only log passwords in test environments
98-
console.log("Password is: " + password); // OK, but still flagged
98+
console.log("Password is: " + password); // OK, but still flagged [INCONSISTENCY]
9999
}
100100

101101

@@ -107,7 +107,7 @@
107107
}
108108

109109
if (environment.isTestEnv())
110-
console.log("Password is: " + password); // OK, but still flagged
110+
console.log("Password is: " + password); // OK, but still flagged [INCONSISTENCY]
111111

112112
if (x.test(y)) {
113113
if (f()) {
@@ -116,7 +116,7 @@
116116
}
117117

118118
if (!environment.isProduction()) {
119-
console.log("Password is: " + password); // OK, but still flagged
119+
console.log("Password is: " + password); // OK, but still flagged [INCONSISTENCY]
120120
}
121121

122122
console.log(name + ", " + password.toString()); // NOT OK

0 commit comments

Comments
 (0)