mirror of
https://github.com/github/codeql.git
synced 2025-12-22 03:36:30 +01:00
Python: Move hack from CastNode into flowCheckNodeSpecific
This commit is contained in:
@@ -486,6 +486,13 @@ class DataFlowType extends TDataFlowType {
|
||||
|
||||
/** A node that performs a type cast. */
|
||||
class CastNode extends Node {
|
||||
CastNode() { none() }
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `n` should be a FlowCheckNode, which will appear in path summaries.
|
||||
*/
|
||||
predicate flowCheckNodeSpecific(Node n) {
|
||||
// We include read- and store steps here to force them to be
|
||||
// shown in path explanations.
|
||||
// This hack is necessary, because we have included some of these
|
||||
@@ -494,14 +501,9 @@ class CastNode extends Node {
|
||||
// We should revert this once, we can remove this steps from the
|
||||
// default taint steps; this should be possible once we have
|
||||
// implemented flow summaries and recursive content.
|
||||
CastNode() { readStep(_, _, this) or storeStep(_, _, this) }
|
||||
readStep(_, _, n) or storeStep(_, _, n)
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `n` should be a FlowCheckNode, which will appear in path summaries.
|
||||
*/
|
||||
predicate flowCheckNodeSpecific(Node n) { none() }
|
||||
|
||||
/**
|
||||
* Holds if `t1` and `t2` are compatible, that is, whether data can flow from
|
||||
* a node of type `t1` to a node of type `t2`.
|
||||
|
||||
Reference in New Issue
Block a user