mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
python: add summary flow steps
This commit is contained in:
committed by
GitHub
parent
828db3a392
commit
8c263b349f
@@ -282,6 +282,8 @@ module EssaFlow {
|
|||||||
nodeTo = TKwOverflowNode(call, callable) and
|
nodeTo = TKwOverflowNode(call, callable) and
|
||||||
nodeFrom.asCfgNode() = call.getNode().getKwargs().getAFlowNode()
|
nodeFrom.asCfgNode() = call.getNode().getKwargs().getAFlowNode()
|
||||||
)
|
)
|
||||||
|
or
|
||||||
|
FlowSummaryImpl::Private::Steps::summaryLocalStep(nodeFrom, nodeTo, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
predicate useToNextUse(NameNode nodeFrom, NameNode nodeTo) {
|
predicate useToNextUse(NameNode nodeFrom, NameNode nodeTo) {
|
||||||
@@ -507,6 +509,8 @@ predicate storeStep(Node nodeFrom, Content c, Node nodeTo) {
|
|||||||
matchStoreStep(nodeFrom, c, nodeTo)
|
matchStoreStep(nodeFrom, c, nodeTo)
|
||||||
or
|
or
|
||||||
any(Orm::AdditionalOrmSteps es).storeStep(nodeFrom, c, nodeTo)
|
any(Orm::AdditionalOrmSteps es).storeStep(nodeFrom, c, nodeTo)
|
||||||
|
or
|
||||||
|
FlowSummaryImpl::Private::Steps::summaryStoreStep(nodeFrom, c, nodeTo)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -700,6 +704,8 @@ predicate readStep(Node nodeFrom, Content c, Node nodeTo) {
|
|||||||
attributeReadStep(nodeFrom, c, nodeTo)
|
attributeReadStep(nodeFrom, c, nodeTo)
|
||||||
or
|
or
|
||||||
kwUnpackReadStep(nodeFrom, c, nodeTo)
|
kwUnpackReadStep(nodeFrom, c, nodeTo)
|
||||||
|
or
|
||||||
|
FlowSummaryImpl::Private::Steps::summaryReadStep(nodeFrom, c, nodeTo)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Data flows from a sequence to a subscript of the sequence. */
|
/** Data flows from a sequence to a subscript of the sequence. */
|
||||||
@@ -824,6 +830,8 @@ predicate clearsContent(Node n, Content c) {
|
|||||||
matchClearStep(n, c)
|
matchClearStep(n, c)
|
||||||
or
|
or
|
||||||
attributeClearStep(n, c)
|
attributeClearStep(n, c)
|
||||||
|
or
|
||||||
|
FlowSummaryImpl::Private::Steps::summaryClearsContent(n, c)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -875,7 +883,11 @@ int accessPathLimit() { result = 5 }
|
|||||||
predicate forceHighPrecision(Content c) { none() }
|
predicate forceHighPrecision(Content c) { none() }
|
||||||
|
|
||||||
/** Holds if `n` should be hidden from path explanations. */
|
/** Holds if `n` should be hidden from path explanations. */
|
||||||
predicate nodeIsHidden(Node n) { none() }
|
predicate nodeIsHidden(Node n) {
|
||||||
|
n instanceof SummaryNode
|
||||||
|
or
|
||||||
|
n instanceof SummaryParameterNode
|
||||||
|
}
|
||||||
|
|
||||||
class LambdaCallKind = Unit;
|
class LambdaCallKind = Unit;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user