Merge branch 'main' into napalys/ES2024-group-functions

This commit is contained in:
Napalys Klicius
2024-11-20 14:00:30 +01:00
committed by Napalys
597 changed files with 13346 additions and 3511 deletions

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
Added taint-steps for `Array.prototype.with`.

View File

@@ -477,7 +477,7 @@ private module ArrayLibraries {
private class ImmutableArrayTransformStep extends TaintTracking::SharedTaintStep {
override predicate heapStep(DataFlow::Node pred, DataFlow::Node succ) {
exists(DataFlow::MethodCallNode call |
call.getMethodName() in ["toSorted", "toReversed"] and
call.getMethodName() in ["toSorted", "toReversed", "with"] and
pred = call.getReceiver() and
succ = call
)

View File

@@ -248,6 +248,8 @@ typeInferenceMismatch
| tst.js:2:13:2:20 | source() | tst.js:74:10:74:34 | Object. ... z => z) |
| tst.js:2:13:2:20 | source() | tst.js:78:55:78:58 | item |
| tst.js:2:13:2:20 | source() | tst.js:79:14:79:20 | grouped |
| tst.js:2:13:2:20 | source() | tst.js:100:10:100:17 | x.with() |
| tst.js:2:13:2:20 | source() | tst.js:102:10:102:14 | xWith |
| tst.js:75:22:75:29 | source() | tst.js:75:10:75:52 | Map.gro ... (item)) |
| tst.js:75:22:75:29 | source() | tst.js:75:47:75:50 | item |
| tst.js:82:23:82:30 | source() | tst.js:83:58:83:61 | item |

View File

@@ -96,4 +96,8 @@ function test() {
sink(taintedValue); // NOT OK
sink(map.get(true)); // NOT OK
}
sink(x.with()) // NOT OK
const xWith = x.with();
sink(xWith) // NOT OK
}