Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7021be0

Browse files
committed
JS: FlowStepThroughImport
1 parent 52279d4 commit 7021be0

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

javascript/ql/src/semmle/javascript/dataflow/Configuration.qll

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -886,13 +886,12 @@ abstract class AdditionalSink extends DataFlow::Node {
886886
* Additional flow step to model flow from import specifiers into the SSA variable
887887
* corresponding to the imported variable.
888888
*/
889-
private class FlowStepThroughImport extends AdditionalFlowStep, DataFlow::ValueNode {
890-
override ImportSpecifier astNode;
891-
889+
private class FlowStepThroughImport extends SharedFlowStep {
892890
override predicate step(DataFlow::Node pred, DataFlow::Node succ) {
893-
Stages::FlowSteps::ref() and
894-
pred = this and
895-
succ = DataFlow::ssaDefinitionNode(SSA::definition(astNode))
891+
exists(ImportSpecifier specifier |
892+
pred = DataFlow::valueNode(specifier) and
893+
succ = DataFlow::ssaDefinitionNode(SSA::definition(specifier))
894+
)
896895
}
897896
}
898897

0 commit comments

Comments
 (0)