diff --git a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowPrivate.qll b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowPrivate.qll index b1eb741a570..7e1323ac02d 100644 --- a/python/ql/src/semmle/python/dataflow/new/internal/DataFlowPrivate.qll +++ b/python/ql/src/semmle/python/dataflow/new/internal/DataFlowPrivate.qll @@ -819,7 +819,7 @@ class DataFlowType extends TDataFlowType { /** A node that performs a type cast. */ class CastNode extends Node { - CastNode() { none() } + CastNode() { readStep(_, _, this) or storeStep(_, _, this) } } /** diff --git a/python/ql/test/experimental/library-tests/frameworks/modeling-example/ProperModel.expected b/python/ql/test/experimental/library-tests/frameworks/modeling-example/ProperModel.expected index bbc5056d6a6..c1f6f57ef04 100644 --- a/python/ql/test/experimental/library-tests/frameworks/modeling-example/ProperModel.expected +++ b/python/ql/test/experimental/library-tests/frameworks/modeling-example/ProperModel.expected @@ -1,10 +1,14 @@ edges -| test.py:21:11:21:18 | ControlFlowNode for source() | test.py:22:10:22:24 | ControlFlowNode for Attribute() | -| test.py:29:11:29:18 | ControlFlowNode for source() | test.py:33:10:33:12 | ControlFlowNode for val | -| test.py:39:15:39:17 | ControlFlowNode for arg | test.py:41:10:41:12 | ControlFlowNode for val | +| test.py:21:11:21:18 | ControlFlowNode for source() | test.py:22:10:22:22 | ControlFlowNode for Attribute | +| test.py:22:10:22:22 | ControlFlowNode for Attribute | test.py:22:10:22:24 | ControlFlowNode for Attribute() | +| test.py:29:11:29:18 | ControlFlowNode for source() | test.py:31:20:31:32 | ControlFlowNode for Attribute | +| test.py:31:20:31:32 | ControlFlowNode for Attribute | test.py:33:10:33:12 | ControlFlowNode for val | +| test.py:39:15:39:17 | ControlFlowNode for arg | test.py:40:11:40:23 | ControlFlowNode for Attribute | +| test.py:40:11:40:23 | ControlFlowNode for Attribute | test.py:41:10:41:12 | ControlFlowNode for val | | test.py:45:11:45:18 | ControlFlowNode for source() | test.py:46:15:46:17 | ControlFlowNode for src | | test.py:46:15:46:17 | ControlFlowNode for src | test.py:39:15:39:17 | ControlFlowNode for arg | -| test.py:52:24:52:26 | ControlFlowNode for arg | test.py:54:10:54:12 | ControlFlowNode for val | +| test.py:52:24:52:26 | ControlFlowNode for arg | test.py:53:11:53:23 | ControlFlowNode for Attribute | +| test.py:53:11:53:23 | ControlFlowNode for Attribute | test.py:54:10:54:12 | ControlFlowNode for val | | test.py:57:33:57:35 | ControlFlowNode for arg | test.py:58:24:58:26 | ControlFlowNode for arg | | test.py:58:24:58:26 | ControlFlowNode for arg | test.py:52:24:52:26 | ControlFlowNode for arg | | test.py:61:33:61:35 | ControlFlowNode for arg | test.py:62:33:62:35 | ControlFlowNode for arg | @@ -27,14 +31,18 @@ edges | test.py:108:46:108:58 | ControlFlowNode for Attribute | test.py:102:46:102:47 | ControlFlowNode for bm | nodes | test.py:21:11:21:18 | ControlFlowNode for source() | semmle.label | ControlFlowNode for source() | +| test.py:22:10:22:22 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | | test.py:22:10:22:24 | ControlFlowNode for Attribute() | semmle.label | ControlFlowNode for Attribute() | | test.py:29:11:29:18 | ControlFlowNode for source() | semmle.label | ControlFlowNode for source() | +| test.py:31:20:31:32 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | | test.py:33:10:33:12 | ControlFlowNode for val | semmle.label | ControlFlowNode for val | | test.py:39:15:39:17 | ControlFlowNode for arg | semmle.label | ControlFlowNode for arg | +| test.py:40:11:40:23 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | | test.py:41:10:41:12 | ControlFlowNode for val | semmle.label | ControlFlowNode for val | | test.py:45:11:45:18 | ControlFlowNode for source() | semmle.label | ControlFlowNode for source() | | test.py:46:15:46:17 | ControlFlowNode for src | semmle.label | ControlFlowNode for src | | test.py:52:24:52:26 | ControlFlowNode for arg | semmle.label | ControlFlowNode for arg | +| test.py:53:11:53:23 | ControlFlowNode for Attribute | semmle.label | ControlFlowNode for Attribute | | test.py:54:10:54:12 | ControlFlowNode for val | semmle.label | ControlFlowNode for val | | test.py:57:33:57:35 | ControlFlowNode for arg | semmle.label | ControlFlowNode for arg | | test.py:58:24:58:26 | ControlFlowNode for arg | semmle.label | ControlFlowNode for arg |