mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
@@ -86,6 +86,8 @@
|
||||
| tst.js:2:17:2:22 | "src1" | tst.js:61:16:61:18 | o.r |
|
||||
| tst.js:2:17:2:22 | "src1" | tst.js:68:16:68:22 | inner() |
|
||||
| tst.js:2:17:2:22 | "src1" | tst.js:80:16:80:22 | outer() |
|
||||
| tst.js:2:17:2:22 | "src1" | tst.js:87:16:87:43 | source1 ... /g, "") |
|
||||
| tst.js:2:17:2:22 | "src1" | tst.js:88:16:88:46 | "foo".r ... ource1) |
|
||||
| underscore.js:2:17:2:22 | "src1" | underscore.js:3:15:3:28 | _.max(source1) |
|
||||
| underscore.js:5:17:5:22 | "src2" | underscore.js:6:15:6:34 | _.union([], source2) |
|
||||
| underscore.js:5:17:5:22 | "src2" | underscore.js:7:15:7:32 | _.zip(source2, []) |
|
||||
|
||||
@@ -83,4 +83,7 @@
|
||||
|
||||
o.notTracked = source1;
|
||||
var sink22 = o.notTracked;
|
||||
|
||||
var sink23 = source1.replaceAll(/f/g, "");
|
||||
var sink24 = "foo".replaceAll(/f/g, source1);
|
||||
})();
|
||||
|
||||
@@ -18,4 +18,10 @@
|
||||
var [clean3, tainted3] = await Promise.all(["clean", Promise.resolve(source)]);
|
||||
sink(clean3); // OK
|
||||
sink(tainted3); // NOT OK - but only flagged by taint-tracking
|
||||
|
||||
var tainted4 = await Promise.race(["clean", Promise.resolve(source)]);
|
||||
sink(tainted4); // NOT OK - but only flagged by taint-tracking
|
||||
|
||||
var tainted5 = await Promise.any(["clean", Promise.resolve(source)]);
|
||||
sink(tainted5); // NOT OK - but only flagged by taint-tracking
|
||||
});
|
||||
@@ -9,6 +9,12 @@ test_ResolvedPromiseDefinition
|
||||
| flow2.js:18:33:18:79 | Promise ... urce)]) | flow2.js:18:46:18:52 | "clean" |
|
||||
| flow2.js:18:33:18:79 | Promise ... urce)]) | flow2.js:18:55:18:77 | Promise ... source) |
|
||||
| flow2.js:18:55:18:77 | Promise ... source) | flow2.js:18:71:18:76 | source |
|
||||
| flow2.js:22:23:22:70 | Promise ... urce)]) | flow2.js:22:37:22:43 | "clean" |
|
||||
| flow2.js:22:23:22:70 | Promise ... urce)]) | flow2.js:22:46:22:68 | Promise ... source) |
|
||||
| flow2.js:22:46:22:68 | Promise ... source) | flow2.js:22:62:22:67 | source |
|
||||
| flow2.js:25:23:25:69 | Promise ... urce)]) | flow2.js:25:36:25:42 | "clean" |
|
||||
| flow2.js:25:23:25:69 | Promise ... urce)]) | flow2.js:25:45:25:67 | Promise ... source) |
|
||||
| flow2.js:25:45:25:67 | Promise ... source) | flow2.js:25:61:25:66 | source |
|
||||
| flow.js:4:11:4:33 | Promise ... source) | flow.js:4:27:4:32 | source |
|
||||
| flow.js:20:2:20:24 | Promise ... source) | flow.js:20:18:20:23 | source |
|
||||
| flow.js:22:2:22:24 | Promise ... source) | flow.js:22:18:22:23 | source |
|
||||
@@ -201,6 +207,8 @@ flow
|
||||
| flow2.js:2:15:2:22 | "source" | flow2.js:6:8:6:13 | arr[0] |
|
||||
| flow2.js:2:15:2:22 | "source" | flow2.js:12:7:12:13 | tainted |
|
||||
| flow2.js:2:15:2:22 | "source" | flow2.js:16:7:16:14 | tainted2 |
|
||||
| flow2.js:2:15:2:22 | "source" | flow2.js:23:7:23:14 | tainted4 |
|
||||
| flow2.js:2:15:2:22 | "source" | flow2.js:26:7:26:14 | tainted5 |
|
||||
| flow.js:2:15:2:22 | "source" | flow.js:5:7:5:14 | await p1 |
|
||||
| flow.js:2:15:2:22 | "source" | flow.js:8:7:8:14 | await p2 |
|
||||
| flow.js:2:15:2:22 | "source" | flow.js:17:8:17:8 | e |
|
||||
@@ -255,6 +263,12 @@ typetrack
|
||||
| flow2.js:18:27:18:79 | await P ... urce)]) | flow2.js:18:33:18:79 | Promise ... urce)]) | load $PromiseResolveField$ |
|
||||
| flow2.js:18:33:18:79 | Promise ... urce)]) | flow2.js:18:45:18:78 | ["clean ... ource)] | copy $PromiseResolveField$ |
|
||||
| flow2.js:18:33:18:79 | Promise ... urce)]) | flow2.js:18:45:18:78 | ["clean ... ource)] | store $PromiseResolveField$ |
|
||||
| flow2.js:22:17:22:70 | await P ... urce)]) | flow2.js:22:23:22:70 | Promise ... urce)]) | load $PromiseResolveField$ |
|
||||
| flow2.js:22:23:22:70 | Promise ... urce)]) | flow2.js:22:46:22:68 | Promise ... source) | copy $PromiseResolveField$ |
|
||||
| flow2.js:22:23:22:70 | Promise ... urce)]) | flow2.js:22:46:22:68 | Promise ... source) | store $PromiseResolveField$ |
|
||||
| flow2.js:25:17:25:69 | await P ... urce)]) | flow2.js:25:23:25:69 | Promise ... urce)]) | load $PromiseResolveField$ |
|
||||
| flow2.js:25:23:25:69 | Promise ... urce)]) | flow2.js:25:45:25:67 | Promise ... source) | copy $PromiseResolveField$ |
|
||||
| flow2.js:25:23:25:69 | Promise ... urce)]) | flow2.js:25:45:25:67 | Promise ... source) | store $PromiseResolveField$ |
|
||||
| flow.js:20:2:20:43 | Promise ... ink(x)) | flow.js:20:36:20:42 | sink(x) | copy $PromiseResolveField$ |
|
||||
| flow.js:20:2:20:43 | Promise ... ink(x)) | flow.js:20:36:20:42 | sink(x) | store $PromiseResolveField$ |
|
||||
| flow.js:20:31:20:31 | x | flow.js:20:2:20:24 | Promise ... source) | load $PromiseResolveField$ |
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
| polynomial-redos.js:31:42:31:43 | -+ | it can start matching anywhere |
|
||||
| polynomial-redos.js:32:45:32:47 | \\n* | it can start matching anywhere |
|
||||
| polynomial-redos.js:33:17:33:20 | (.)* | it can start matching anywhere |
|
||||
| polynomial-redos.js:48:22:48:24 | \\s* | it can start matching anywhere |
|
||||
| regexplib/address.js:18:26:18:31 | [ \\w]* | it can start matching anywhere after the start of the preceeding '[ \\w]{3,}' |
|
||||
| regexplib/address.js:20:144:20:147 | [ ]+ | it can start matching anywhere after the start of the preceeding '[a-zA-Z0-9 \\-.]{6,}' |
|
||||
| regexplib/address.js:24:26:24:31 | [ \\w]* | it can start matching anywhere after the start of the preceeding '[ \\w]{3,}' |
|
||||
|
||||
@@ -28,6 +28,8 @@ nodes
|
||||
| polynomial-redos.js:30:2:30:8 | tainted |
|
||||
| polynomial-redos.js:33:2:33:8 | tainted |
|
||||
| polynomial-redos.js:33:2:33:8 | tainted |
|
||||
| polynomial-redos.js:48:2:48:8 | tainted |
|
||||
| polynomial-redos.js:48:2:48:8 | tainted |
|
||||
edges
|
||||
| polynomial-redos.js:5:6:5:32 | tainted | polynomial-redos.js:7:2:7:8 | tainted |
|
||||
| polynomial-redos.js:5:6:5:32 | tainted | polynomial-redos.js:7:2:7:8 | tainted |
|
||||
@@ -55,6 +57,8 @@ edges
|
||||
| polynomial-redos.js:5:6:5:32 | tainted | polynomial-redos.js:30:2:30:8 | tainted |
|
||||
| polynomial-redos.js:5:6:5:32 | tainted | polynomial-redos.js:33:2:33:8 | tainted |
|
||||
| polynomial-redos.js:5:6:5:32 | tainted | polynomial-redos.js:33:2:33:8 | tainted |
|
||||
| polynomial-redos.js:5:6:5:32 | tainted | polynomial-redos.js:48:2:48:8 | tainted |
|
||||
| polynomial-redos.js:5:6:5:32 | tainted | polynomial-redos.js:48:2:48:8 | tainted |
|
||||
| polynomial-redos.js:5:16:5:32 | req.query.tainted | polynomial-redos.js:5:6:5:32 | tainted |
|
||||
| polynomial-redos.js:5:16:5:32 | req.query.tainted | polynomial-redos.js:5:6:5:32 | tainted |
|
||||
#select
|
||||
@@ -72,3 +76,4 @@ edges
|
||||
| polynomial-redos.js:27:77:27:83 | tainted | polynomial-redos.js:5:16:5:32 | req.query.tainted | polynomial-redos.js:27:77:27:83 | tainted | This expensive $@ use depends on $@. | polynomial-redos.js:27:14:27:22 | [A-Z]{2,} | regular expression | polynomial-redos.js:5:16:5:32 | req.query.tainted | a user-provided value |
|
||||
| polynomial-redos.js:30:2:30:8 | tainted | polynomial-redos.js:5:16:5:32 | req.query.tainted | polynomial-redos.js:30:2:30:8 | tainted | This expensive $@ use depends on $@. | polynomial-redos.js:30:19:30:22 | [?]+ | regular expression | polynomial-redos.js:5:16:5:32 | req.query.tainted | a user-provided value |
|
||||
| polynomial-redos.js:33:2:33:8 | tainted | polynomial-redos.js:5:16:5:32 | req.query.tainted | polynomial-redos.js:33:2:33:8 | tainted | This expensive $@ use depends on $@. | polynomial-redos.js:33:17:33:20 | (.)* | regular expression | polynomial-redos.js:5:16:5:32 | req.query.tainted | a user-provided value |
|
||||
| polynomial-redos.js:48:2:48:8 | tainted | polynomial-redos.js:5:16:5:32 | req.query.tainted | polynomial-redos.js:48:2:48:8 | tainted | This expensive $@ use depends on $@. | polynomial-redos.js:48:22:48:24 | \\s* | regular expression | polynomial-redos.js:5:16:5:32 | req.query.tainted | a user-provided value |
|
||||
|
||||
@@ -45,5 +45,5 @@ app.use(function(req, res) {
|
||||
|
||||
tainted.match(/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/); // NOT OK - but not flagged
|
||||
tainted.match(/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/); // OK
|
||||
|
||||
tainted.replaceAll(/\s*\n\s*/g, ' '); // NOT OK
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user