mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
JS: add localFieldStep
This commit is contained in:
@@ -1078,6 +1078,16 @@ module DataFlow {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if there is a step from `pred` to `succ` through a field accessed through `this` in a class.
|
||||
*/
|
||||
predicate localFieldStep(DataFlow::Node pred, DataFlow::Node succ) {
|
||||
exists (ClassNode cls, string prop |
|
||||
pred = cls.getAReceiverNode().getAPropertyWrite(prop).getRhs() and
|
||||
succ = cls.getAReceiverNode().getAPropertyRead(prop)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the data flow node representing the source of definition `def`, taking
|
||||
* flow through IIFE calls into account.
|
||||
|
||||
Reference in New Issue
Block a user