зеркало из https://github.com/github/codeql.git
JS: Restrict useSelector steps to local callbacks
This commit is contained in:
Родитель
3cc931306f
Коммит
4ce03d4dc4
|
@ -994,7 +994,7 @@ module Redux {
|
|||
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
exists(API::CallNode call |
|
||||
call = useSelector().getACall() and
|
||||
pred = call.getParameter(0).getReturn().asSink() and
|
||||
pred = call.getCallback(0).getReturnNode() and
|
||||
succ = call
|
||||
)
|
||||
}
|
||||
|
|
|
@ -118,11 +118,6 @@ reactComponentRef
|
|||
| react-redux.jsx:64:1:80:1 | functio ... r}}/>\\n} | react-redux.jsx:94:28:94:84 | connect ... ponent) |
|
||||
| react-redux.jsx:64:1:80:1 | functio ... r}}/>\\n} | react-redux.jsx:97:12:97:12 | c |
|
||||
ambiguousAccessPath
|
||||
| accessPaths.js:4:12:4:26 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getReturn() | x1 |
|
||||
| accessPaths.js:4:12:4:26 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getReturn() | x2 |
|
||||
| accessPaths.js:4:12:4:26 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getReturn() | x3 |
|
||||
| accessPaths.js:4:12:4:26 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getReturn() | x4 |
|
||||
| accessPaths.js:4:12:4:26 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getReturn() | x5 |
|
||||
getAffectedStateAccessPath
|
||||
| react-redux.jsx:12:33:17:9 | (state, ... } | toolkit |
|
||||
| react-redux.jsx:18:41:23:9 | (state, ... } | toolkit |
|
||||
|
@ -181,13 +176,8 @@ getRootStateAccessPath
|
|||
| toolkit | react-redux.jsx:85:24:85:36 | use entryPoint("react-redux-connect").getParameter(0).getParameter(0).getMember("toolkit") |
|
||||
| toolkit.asyncValue | react-redux.jsx:85:24:85:47 | use entryPoint("react-redux-connect").getParameter(0).getParameter(0).getMember("toolkit").getMember("asyncValue") |
|
||||
| toolkit.value | react-redux.jsx:84:32:84:50 | use entryPoint("react-redux-connect").getParameter(0).getParameter(0).getMember("toolkit").getMember("value") |
|
||||
| x1 | accessPaths.js:4:12:4:26 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getReturn() |
|
||||
| x1 | accessPaths.js:8:44:8:51 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getParameter(0).getParameter(0).getMember("x1") |
|
||||
| x2 | accessPaths.js:4:12:4:26 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getReturn() |
|
||||
| x2 | accessPaths.js:9:44:9:51 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getParameter(0).getParameter(0).getMember("x2") |
|
||||
| x3 | accessPaths.js:4:12:4:26 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getReturn() |
|
||||
| x3 | accessPaths.js:10:44:10:51 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getParameter(0).getParameter(0).getMember("x3") |
|
||||
| x4 | accessPaths.js:4:12:4:26 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getReturn() |
|
||||
| x4 | accessPaths.js:11:44:11:51 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getParameter(0).getParameter(0).getMember("x4") |
|
||||
| x5 | accessPaths.js:4:12:4:26 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getReturn() |
|
||||
| x5 | accessPaths.js:12:44:12:51 | use moduleImport("react-redux").getMember("exports").getMember("useSelector").getParameter(0).getParameter(0).getMember("x5") |
|
||||
|
|
Загрузка…
Ссылка в новой задаче