Skip to content

Commit a96f9fc

Browse files
committed
Added matchAll test which is not marked as vulnurability by CodeQL
1 parent 514375d commit a96f9fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

javascript/ql/test/query-tests/Security/CWE-117/logInjectionGood.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,9 @@ const server = http.createServer((req, res) => {
2727
console.error(`[ERROR] Error: "${error}"`);
2828
}
2929
});
30+
31+
const serverMatchAll = http.createServer((req, res) => {
32+
let username = url.parse(req.url, true).query.username;
33+
let otherStr = username.matchAll(/.*/g)[0]; // BAD - this is suppose to be cought by Taint Tracking, works for match but not matchAll
34+
console.log(otherStr);
35+
});

0 commit comments

Comments
 (0)