зеркало из https://github.com/github/codeql.git
JS: Restrict flow to access paths assigned in a unique file
This commit is contained in:
Родитель
48b70c4f1d
Коммит
313579c258
|
@ -96,12 +96,14 @@ module StepSummary {
|
|||
or
|
||||
exists(string name |
|
||||
name = GlobalAccessPath::fromRhs(pred) and
|
||||
GlobalAccessPath::isAssignedInUniqueFile(name) and
|
||||
succ = DataFlow::globalAccessPathRootPseudoNode() and
|
||||
summary = StoreStep(name)
|
||||
)
|
||||
or
|
||||
exists(string name |
|
||||
name = GlobalAccessPath::fromReference(succ) and
|
||||
GlobalAccessPath::isAssignedInUniqueFile(name) and
|
||||
pred = DataFlow::globalAccessPathRootPseudoNode() and
|
||||
summary = LoadStep(name)
|
||||
)
|
||||
|
|
|
@ -60,6 +60,7 @@ function getFromConfigFramework() {
|
|||
|
||||
function initConnection() {
|
||||
MyApplication.namespace.connection = api.chain1().chain2().createConnection();
|
||||
MyApplication.namespace.conflict = api.chain1().chain2().createConnection();
|
||||
}
|
||||
|
||||
function useConnection() {
|
||||
|
@ -67,4 +68,9 @@ function useConnection() {
|
|||
conn.getData(data => {
|
||||
useData(data);
|
||||
});
|
||||
|
||||
let conflict = MyApplication.namespace.conflict;
|
||||
conn.getData(data => {
|
||||
useData(data);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
import myapi from "@test/myapi";
|
||||
|
||||
let api = new myapi();
|
||||
|
||||
function initConnection() {
|
||||
MyApplication.namespace.conflict = api.chain1().chain2().createConnection();
|
||||
}
|
Загрузка…
Ссылка в новой задаче