mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
implement Immutable OrderedMap
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
var obj = { a: source("a"), b: source("b1") };
|
||||
sink(obj["a"]); // NOT OK
|
||||
|
||||
const { Map, fromJS, List } = require('immutable');
|
||||
const { Map, fromJS, List, OrderedMap } = require('immutable');
|
||||
|
||||
const map1 = Map(obj);
|
||||
|
||||
@@ -31,3 +31,7 @@ List(["safe"]).map(x => source()).forEach(x => sink(x)); // NOT OK
|
||||
List([source()]).map(x => x).filter(x => true).toList().forEach(x => sink(x)); // NOT OK
|
||||
|
||||
List(["safe"]).push(source()).forEach(x => sink(x)); // NOT OK
|
||||
|
||||
|
||||
const map4 = OrderedMap({}).set("f", source());
|
||||
sink(map4.get("f")); // NOT OK
|
||||
@@ -10,3 +10,4 @@
|
||||
| immutable.js:29:25:29:32 | source() | immutable.js:29:53:29:53 | x |
|
||||
| immutable.js:31:7:31:14 | source() | immutable.js:31:75:31:75 | x |
|
||||
| immutable.js:33:21:33:28 | source() | immutable.js:33:49:33:49 | x |
|
||||
| immutable.js:36:38:36:45 | source() | immutable.js:37:6:37:18 | map4.get("f") |
|
||||
|
||||
Reference in New Issue
Block a user