Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fc95702

Browse files
committed
JS: Accept some more alerts from CleartextStorage
1 parent 51b4559 commit fc95702

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ var app = express();
33
app.get('/some/path', function() {
44
})
55

6-
console.log(password);
6+
console.log(password); // $ Alert[js/clear-text-logging]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
require("foo");
22
(function (req, res){});
3-
console.log(password);
3+
console.log(password); // $ Alert[js/clear-text-logging]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
var server = require("./server");
2-
console.log(password);
2+
console.log(password); // $ Alert[js/clear-text-logging]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
require("foo");
2-
console.log(password);
2+
console.log(password); // $ Alert[js/clear-text-logging]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ app.get('/some/path', function() {
55
})
66

77
function f(x) {
8-
console.log(x);
8+
console.log(x); // $ Alert[js/clear-text-logging]
99
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
localStorage.x = data.password;
2-
localStorage.setItem('x', data.password)
3-
sessionStorage.x = data.password;
4-
sessionStorage.setItem('x', data.password)
1+
localStorage.x = data.password; // $ Alert[js/clear-text-storage-of-sensitive-data]
2+
localStorage.setItem('x', data.password) // $ Alert[js/clear-text-storage-of-sensitive-data]
3+
sessionStorage.x = data.password; // $ Alert[js/clear-text-storage-of-sensitive-data]
4+
sessionStorage.setItem('x', data.password) // $ Alert[js/clear-text-storage-of-sensitive-data]

0 commit comments

Comments
 (0)